linux 软件操作脚本

2017-12-27  本文已影响6人  lucode
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
上一篇 下一篇

猜你喜欢

热点阅读