image.png

    1. #!/bin/bash
    2. echo "stop SpringBoot"
    3. pid=`ps -ef | grep prison-upms-client.jar | grep -v grep | awk '{print $2}'`
    4. echo "old id:$pid"
    5. if [ -n "$pid" ]
    6. then
    7. kill -9 $pid
    8. fi
    9. cd /usr/local/project
    10. chmod 777 /usr/local/project/prison-upms-client.jar
    11. source /etc/profile
    12. nohup java -Xms128m -Xmx500m -jar prison-upms-client.jar > sys.log 2>&1 &

    jar 包运行
    nohup java -Xms128m -Xmx500m -jar xxx.jar —httpPort=8000 > xxx.log 2>&1 &