mirror of
https://github.com/TotalFreedomMC/TF-Scripts.git
synced 2024-12-22 07:55:08 +00:00
32 lines
788 B
Bash
32 lines
788 B
Bash
|
#!
|
||
|
sleep 10
|
||
|
if screen -list | grep -q "TotalFreedom";
|
||
|
then
|
||
|
screen -X -S "TotalFreedom" stuff "stop^M"
|
||
|
sleep 5
|
||
|
fi
|
||
|
|
||
|
if screen -list | grep -q "TotalFreedom";
|
||
|
then
|
||
|
screen -X -S "TotalFreedom" stuff "^C"
|
||
|
sleep 5
|
||
|
fi
|
||
|
|
||
|
if screen -list | grep -q "TotalFreedom";
|
||
|
then
|
||
|
screen -X -S "TotalFreedom" stuff "^C^C^C^C^C^C^C^C"
|
||
|
fi
|
||
|
|
||
|
if screen -list | grep -q "TotalFreedom";
|
||
|
then
|
||
|
echo "Graceful Shutdown Failed. Please run tf!kill"
|
||
|
fi
|
||
|
|
||
|
if screen -list | grep -q "TotalFreedom";
|
||
|
then
|
||
|
echo "ERROR - We have been unable to re-start the server... Please execute this manually"
|
||
|
else
|
||
|
screen -dmS TotalFreedom java -Xms18G -Xmx18G -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -jar paperclip.jar
|
||
|
echo "Server Started"
|
||
|
fi
|