2021-03-13 14:57:25 +01:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# ×=====================×
|
|
|
|
|
# | mc-shutdown by peet |
|
|
|
|
|
# ×=====================×
|
|
|
|
|
|
|
|
|
|
if [ "$1" = "-h" ]
|
|
|
|
|
then
|
|
|
|
|
echo "mc-shutdown [option]"
|
|
|
|
|
echo
|
|
|
|
|
echo "Options:"
|
|
|
|
|
echo " -h Show help"
|
|
|
|
|
#echo " -p minigames Server"
|
|
|
|
|
#echo " -h Show help"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#Initialize variables
|
2022-04-08 16:01:14 +02:00
|
|
|
|
password=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# First shutdown waterfall, so all connections are closed
|
|
|
|
|
mcrcon -H 192.168.178.20 -P 25600 -p $password -w 5 "alert Server is shutting down!" end
|
|
|
|
|
|
|
|
|
|
#standart server
|
|
|
|
|
for i in {25600..25604}
|
|
|
|
|
do
|
|
|
|
|
mcrcon -H 192.168.178.20 -P $i -p $password -w 5 save-all stop
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
#modded server
|
|
|
|
|
for i in {25605..25607}
|
|
|
|
|
do
|
|
|
|
|
mcrcon -H 192.168.178.21 -P $i -p $password -w 5 save-all stop
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# minigames server
|
|
|
|
|
for i in {25608..25612}
|
|
|
|
|
do
|
|
|
|
|
mcrcon -H 192.168.178.22 -P $i -p $password -w 5 save-all stop
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# pvp server
|
|
|
|
|
for i in {25613..25615}
|
|
|
|
|
do
|
|
|
|
|
mcrcon -H 192.168.178.23 -P $i -p $password -w 5 save-all stop
|
|
|
|
|
done
|