public
Created

minecraft config files

  • Download Gist
backup.scc
1 2 3 4 5 6 7 8 9
# A simple backup implementation
do save-all
do save-off
 
#note: ##($RECONFIG) edit this to point to the correct master_backup.sh for this server path if multiple share the same host.
execWait /home/admalledd/minecraft/cur/sh/master_backup.sh
 
do save-on
do save-all
curserverpath.sh
Shell
1 2 3
#!/bin/sh
#echo the current server base directory
echo $(dirname $(readlink -f $(dirname $0)/../start.sh))
master_backup.sh
Shell
1 2 3 4 5 6 7 8 9 10 11
#!/bin/bash
echo ---------------->>/tmp/rdiff-log
echo $(date) >>/tmp/rdiff-log
 
 
##backup entire server:
 
#current server path:
CUR=$($(dirname $0)/curserverpath.sh)
 
rdiff-backup -v6 $CUR /home/$USER/minecraft/backup/ >> /tmp/rdiff-log
restart.scc
1 2 3 4 5
# A simple restart implementation
do say good bye! server restarting be back in a tick (5-10 minutes)
do save-all
#exec /mnt/minecraft/cur/sh/restart.sh
exec /home/admalledd/minecraft/cur/sh/restart.sh
restart.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/bin/bash
 
main_server_screen="server"
 
function runcmd {
if [ -n "$STY" ]; then
screen -x $1 -p $2 -X stuff "$3$(echo -ne '\r')"
else
screen -p $2 -X stuff "$3$(echo -ne '\r')"
fi
}
#runcmd $main_server_screen 0 "echo test"
CUR=$($(dirname $0)/curserverpath.sh)
 
runcmd $main_server_screen 0 "stop"
sleep 60
 
#start normal server again
runcmd $main_server_screen 0 "./start.sh copy_map"
tab.scc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# +----------------> Minute
# | +--------------> Hour
# | | +------------> Day of month
# | | | +----------> Month
# | | | | +--------> Day of week
# | | | | | +--> Script/File
# | | | | | |
# * * * * * uname.scc
#say basic server admin-y stuff
*/30 * * * * sayadmin-y.scc
#backup every 60 minutes, 45 minutes after the hour to stay clear of the reboot times
45 * * * * backup.scc
#warn of restart 15 minutes before it occurs:
45 4 * * * warnbackup15.scc
50 4 * * * warnbackup10.scc
55 4 * * * warnbackup5.scc
59 4 * * * warnbackup1.scc
#do restart:
0 5 * * * restart.scc
update_cb.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/bin/sh
out="$($(dirname $0)/curserverpath.sh)/craftbukkit.jar"
if [ -n "$1" ]; then
if [ "$1" = "dev" ]; then
wget "http://dl.bukkit.org/downloads/craftbukkit/get/latest-dev/craftbukkit-dev.jar" -O $out
echo 'using latest dev build'
elif [ "$1" = "beta" ]; then
wget "http://dl.bukkit.org/downloads/craftbukkit/get/latest-beta/craftbukkit-beta.jar" -O $out
echo 'using latest beta build'
elif [ "$1" = "rb" ]; then
wget "http://dl.bukkit.org/downloads/craftbukkit/get/latest-rb/craftbukkit-rb.jar" -O $out
echo 'using latest recomended build'
else
echo 'no build chosen, use ./CMD (dev|beta|rb)'
fi
fi
warnbackup15.scc
1 2
do say server restart in 15 minutes! dont say you were not warned!
###EDITNOTE: this file is the same for 10,5, and 1 minute warning except the message, just an example

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.