rebuild/.deploy/restart-rebuild.sh

23 lines
412 B
Bash
Raw Normal View History

2021-04-08 16:54:53 +08:00
#!/bin/bash
JARFILE=rebuild-boot.jar
echo Use jar file [ $JARFILE ]
PID=$(ps -ef | grep $JARFILE | grep -v grep | awk '{ print $2 }')
if [ -z "$PID" ]
then
echo Rebuild-Boot is already stopped
else
echo Stopping Rebuild-Boot \(kill $PID\) ...
kill $PID
sleep 10
fi
echo "Starting Rebuild-Boot ..."
nohup java -Xms1001M -Xmx1001M -XX:+UseG1GC -jar $JARFILE >/dev/null 2>&1 &
sleep 5
echo done
exit 0