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