mirror of
https://github.com/TotalFreedomMC/TF-Scripts.git
synced 2024-12-22 07:55:08 +00:00
Re-worked the stop script to make it a bit better to work with
Made sure it will now return a value if the server has been shut down as part of this script. Some minor improvements to it's efficiency in the process.
This commit is contained in:
parent
4e71b18351
commit
cdeb526da4
1 changed files with 15 additions and 18 deletions
|
@ -1,24 +1,21 @@
|
||||||
#!
|
#!
|
||||||
if screen -list | grep -q "TotalFreedom";
|
if screen -list | grep -q "TotalFreedom"; then
|
||||||
then
|
|
||||||
screen -X -S "TotalFreedom" stuff "stop^M"
|
screen -X -S "TotalFreedom" stuff "stop^M"
|
||||||
sleep 5
|
sleep 5
|
||||||
else
|
if screen -list | grep -q "TotalFreedom"; then
|
||||||
echo "The server is not running... Try starting it <3"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if screen -list | grep -q "TotalFreedom";
|
|
||||||
then
|
|
||||||
screen -X -S "TotalFreedom" stuff "^C"
|
screen -X -S "TotalFreedom" stuff "^C"
|
||||||
sleep 5
|
sleep 5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if screen -list | grep -q "TotalFreedom";
|
if screen -list | grep -q "TotalFreedom"; then
|
||||||
then
|
|
||||||
screen -X -S "TotalFreedom" stuff "^C^C^C^C^C^C^C^C"
|
screen -X -S "TotalFreedom" stuff "^C^C^C^C^C^C^C^C"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if screen -list | grep -q "TotalFreedom";
|
if screen -list | grep -q "TotalFreedom"; then
|
||||||
then
|
|
||||||
echo "Graceful Shutdown Failed. Please run tf!kill"
|
echo "Graceful Shutdown Failed. Please run tf!kill"
|
||||||
|
else
|
||||||
|
echo "Server has been shut down succesfully."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "The server is not running... Try starting it <3"
|
||||||
fi
|
fi
|
Loading…
Reference in a new issue