View Single Post
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2012-07-14, 23:39

This evening I spent some time tweaking our server setup. After I reinitialized "speedy" (the SSD) and moved the world back into place, I started scrutinizing our maintenance scripts. I ended up archiving all of my custom scripts and replaced them with a fork of this init script. I've cloned a copy to /opt/minecraft/scripts/minecraft-init-script and committed seven changes (so far) to the local repo to add some functionality and make it behave more nicely on Lenny.

turtle, this means the old kickstart, run, and backup scripts are gone. In their place is a proper init script at /etc/init.d/minecraft. I've also chkconfig'd it so it should start up automatically whenever the server reboots. It writes backups (use "sudo /etc/init.d/minecraft backup") to the same directory and keeps a rolling symlink just like my old script. I have the following cron jobs now:

Code:
0 6,18 * * * /etc/init.d/minecraft backup 0 5 * * * /etc/init.d/minecraft command "say Server restart in 2 minutes! Get somewhere safe!" 0 5 * * * /etc/init.d/minecraft logrotate 2 5 * * * /etc/init.d/minecraft restart

If you have anything that called the old backup script, you should disable that part and let it just pull the latest world backup symlink. If you want to, you could have it call the init script with the "backup" argument, but that might be overkill.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote