Created
September 21, 2010 16:05
-
-
Save TheLinx/589938 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: These are Minecraft server management scripts. They're quite handy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function print { | |
screen -S mc -X stuff "$1 | |
" | |
} | |
print "say Creating backup..." | |
print "save-off" | |
print "save-all" | |
zip -r /tmp/fpfa.zip /home/thelinx/mc/fpfa/* | |
mv /tmp/fpfa.zip /var/www/mc/`date "+fpfa-%m%d%H.zip"` | |
print "say Backup completed!" | |
print "save-all" | |
print "save-on" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 2GB ram because 1GB was not enough ;_; | |
screen -dmS mc java -Xmx2048M -Xms2048M -jar minecraft_server.jar nogui | |
echo "Server started." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function print { | |
screen -S mc -X stuff "$1 | |
" | |
} | |
print "say Server shutting down in 5..." | |
sleep 1 | |
for n in 4 3 2 1; do | |
print "say $n..." | |
sleep 1 | |
done | |
print "stop" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment