Initscript for minecraft/bukkit servers
A good start if you plan to run a minecraft server using Linux. Moving this scriptfile to /etc/init.d will start the minecraftserver at boot.
The initscript will make the server use a ramdisk to contain the world. Ramdisk is a part of the ram mounted as a disk and will speed up the server especially if you've enabled teleportation. It also has the ability to backup and clean the server.log. A big logfile slows down the server alot.
Requirements
screen,rsync
Access server console
screen -r minecraft
Exit the console
Ctrl+A D
Setup
-
Move or symlink the script to
/etc/init.d/minecraft
, set the required premissions and update rc.d.chmod 755 /etc/init.d/minecraft update-rc.d minecraft defaults
-
Mount a ramdisk or use the one already mounted at
/dev/shm/
-
Move your worlds to the folder specified by
WORLDSTORAGE
-
Edit crontab
sudo crontab -e
and add these lines
#m h dom mon dow command 02 05 * * * /etc/init.d/minecraft backup 55 04 * * * /etc/init.d/minecraft log-roll */30 * * * * /etc/init.d/minecraft to-disk
-
Edit the variables in the script file to your needs
-
To load a world from ramdisk run:
/etc/init.d/minecraft ramdisk WORLDNAME
to disable ramdisk, run the same command again.
For more help with the script, run
/etc/init.d/minecraft help