美文网首页
jar 包启动自动脚本

jar 包启动自动脚本

作者: 十二找十三 | 来源:发表于2020-10-12 10:23 被阅读0次
#!/bin/sh
source /etc/profile
source /root/.bash_profile
workdir=$(cd $(dirname $0); pwd)

jarname=im-1.0-SNAPSHOT.jar

echo "${jarname} start..."

ps -ef | grep ${jarname} | grep -v grep
if [ $? -ne 0 ]
then
echo "start ${jarname} process....."
cd $workdir
java -jar ${jarname} >> ./logs/start.log 2>&1 &
else
echo "${jarname} runing....."
fi

相关文章

网友评论

      本文标题:jar 包启动自动脚本

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