linux 下批量操作web服务
程序员文章站
2022-03-07 08:08:47
...
服务器上的应用很多,一个一个的操作,太麻烦。
写脚本批量start 、stop 、restart
写脚本批量start 、stop 、restart
#!/bin/bash ############################################# # Scripts for rotating catalina daily # at 2012-06-07 ############################################# workPath=$1 cmd=$2 if [ -z ${workPath} ];then echo "参数异常" exit fi if [ -z ${cmd} ];then echo "请输入参数 start stop restart" exit fi for appPath in ${workPath}*;do if [ "stop" = ${cmd} ]||[ "restart" = ${cmd} ] then ${appPath}/bin/shutdown.sh echo "shudown ${cmd} " fi sleep 3 if [ "start" = ${cmd} ]||[ "restart" = ${cmd} ] then ${appPath}/bin/startup.sh echo "startUp ${cmd}" fi done
推荐阅读
-
linux下java web开发环境搭建
-
linux下perl操作mysql数据库(需要安装DBI)
-
Linux下配置和安装Domino 服务器 2
-
linux下perl操作mysql数据库(需要安装DBI)
-
linux下用renameTo方法修改java web项目中文件夹名称的实例
-
Linux下安装Mysql多实例作为数据备份服务器实现多主到一从多实例的备份
-
如何在Linux下安装Sendmail服务器软件的方法
-
Linux下将Mysql和Apache加入到系统服务里的方法
-
linux下用renameTo方法修改java web项目中文件夹名称的实例
-
Linux下安装Mysql多实例作为数据备份服务器实现多主到一从多实例的备份