微服务jar的启动脚本
#!/bin/sh
appname=springboot-notify-starter.jar
pid=`ps -ef|grep -v grep|grep ${appname}|awk '{print $2}'`
echo $pid -----stop-------
if [[ v$pid!=v ]]
then
echo will stop....
kill -9 $pid
sleep 3
echo springboot-notify-starter stoped....
fi
nohup java -jar ${appname} --spring.profiles.active=prod --server.port=8080 >/dev/null 2>&1 &
sleep 3
echo springboot-notify-starter start......
sleep 3
tailf /java/springboot/consumer/application.log