美文网首页
linux 软件操作脚本

linux 软件操作脚本

作者: lucode | 来源:发表于2017-12-27 15:16 被阅读6次
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

相关文章

网友评论

      本文标题:linux 软件操作脚本

      本文链接:https://www.haomeiwen.com/subject/xzeugxtx.html