Linux下启动停止服务shell脚本
jenkins构建重新部署时脚本:
#!/bin/bash app=auth jar_pid=`ps -ef|grep -v grep | grep ‘java -jar e-$app-controller-1.0-SNAPSHOT.jar‘|awk ‘{ print $2 }‘` echo $jar_pid if [ ! -n "$jar_pid" ]; then echo ‘will redeploy.‘ #rm -rf nohup.out nohup java -jar e-$app-controller-1.0-SNAPSHOT.jar >>$app.log 2>&1 & echo ‘redeploy success-001.‘ else kill -9 $jar_pid echo ‘kill‘ $jar_pid nohup java -jar e-$app-controller-1.0-SNAPSHOT.jar >>$app.log 2>&1 & echo ‘redeploy success-002.‘ fi
相关推荐
linuxwcj 2020-10-21
彼岸随笔 2020-10-20
yutou0 2020-10-17
jarrygao 2020-11-02
shipinsky 2020-09-23
touchfuture 2020-09-16
hongsheyoumo 2020-09-04
吴家应 2020-03-02
momoku 2020-09-11
ruancw 2020-08-27
TuxedoLinux 2020-08-18
vvu 2020-08-16
downtown 2020-08-11
luvzhan 2020-07-28
maxelliot 2020-06-28
cuixingwudi 2020-06-25
linuxdashencom 2020-06-21
旭灿 2020-06-16