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";
|
||||
then
|
||||
if screen -list | grep -q "TotalFreedom"; then
|
||||
screen -X -S "TotalFreedom" stuff "stop^M"
|
||||
sleep 5
|
||||
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"
|
||||
else
|
||||
echo "Server has been shut down succesfully."
|
||||
fi
|
||||
else
|
||||
echo "The server is not running... Try starting it <3"
|
||||
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
|
Loading…
Reference in a new issue