mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-11-14 19:34:49 +08:00
23 lines
412 B
Bash
23 lines
412 B
Bash
|
#!/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
|