- prerz.sh
vDate=`date +%Y-%m-%d_%H-%M`
mv xxxx.jar xxxx.jar_${vDate}
echo 'mv success'
- afterrz.sh
ps aux | grep xxxx.jar | grep -v grep | cut -c 9-15 | xargs kill
echo 'kill xxxx.jar success'
nohup java -jar xxxx.jar &
echo 'restart xxxx.jar success'
网友评论