minecraft-bukkit-start-script/mc-shutdown

47 lines
900 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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
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