TF-Scripts/FreeOP Servers/spigot-restart.sh
Ryan Wild 4e71b18351
Added FreeOP Scripts
This is as they currently stand, I know there are better ways to have set these up but they've worked okay for now.
2021-03-21 14:04:57 +00:00

31 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