#!/bin/sh ### BEGIN INIT INFO # Provides: minecraft_server # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # chkconfig: 345 50 50 # Description: Minecraft Server Control Script ### END INIT INFO # --------------------------------------------------------------------------- # Copyright (c) 2011-2014, Jason M. Wood # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # --------------------------------------------------------------------------- # --------------------------------------------------------------------------- # Minecraft Server Control Script # # A powerful command-line control script for Linux-powered Minecraft servers. # --------------------------------------------------------------------------- # Script Usage # --------------------------------------------------------------------------- USAGE=$(cat < Options: start Start the Minecraft world server. Start all world servers by default. stop Stop the Minecraft world server. Stop all world servers by default. force-stop Forcibly stop the Minecraft world server. Forcibly stop all world servers by default. restart Restart the Minecraft world server. Restart all world servers by default. force-restart Forcibly restart the Minecraft world server. Forcibly restart all world servers by default. create Create a Minecraft world server. The world name and port must be provided, the IP addressis usually blank. delete Delete a Minecraft world server. disable Temporarily disable a world server. enable Enable a disabled world server. list