Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 1.54 KB

README.md

File metadata and controls

61 lines (47 loc) · 1.54 KB

Init Script for Minecraft Servers

1. Purpose

An init script for starting and stopping the server correctly.

2. Requirements

  • screen
  • rsync

3. Setup

  1. Symlink the minecraft file to /etc/init.d/minecraft:
    sudo ln -s ~/minecraft-init/minecraft /etc/init.d/minecraft
  2. Set the required permissions:
    chmod 755  ~/minecraft-init/minecraft
  3. Update rc.d:
    sudo update-rc.d minecraft defaults
  4. Edit the variables in config.example to your needs and rename it to config (leaving it in the same folder as the original minecraft script).
  5. Move your worlds to the folder specified by WORLDSTORAGE.
  6. As the server user, run crontab -e and add these lines:
    #m 	h 	dom	mon	dow	command
    02 	05 	*	*	*	/etc/init.d/minecraft backup
    ``
    
    

4. Usage

4.1. Accessing the Server Console

  • To access the console, run screen -r minecraft.
  • Exit the console with [Ctrl]+ [A] + [D]

4.2. Obtaining Help

For more help with the script, run /etc/init.d/minecraft help.

5. Credits