×

linux 软件操作脚本

96
lucode
2017.12.27 15:16* 字数 0
port=$(lsof -i:8080)
str="java"
result=$(echo $port | grep ${str})
if test $result!=""
then
   echo "启动 tomcat "
   sh /www/server/tomcat/bin/catalina.sh run
else
   echo "tomcat正常运行"
fi
# 检测 mq 是否运行
port=$(lsof -i:8161)
str="java"
result=$(echo $port | grep ${str})
if test $result!=""
then
   echo "启动  mq "
   cd /www/server/apache-activemq-5.15.3/bin
    ./activemq start
else
   echo "mq正常运行"
fi
技术杂货
Web note ad 1