diff --git a/minecraft b/minecraft old mode 100644 new mode 100755 diff --git a/msm b/msm new file mode 100755 index 0000000..3a4a25a --- /dev/null +++ b/msm @@ -0,0 +1,160 @@ +#!/bin/bash + +### BEGIN INIT INFO +# Provides: msm +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Should-Start: $network +# Should-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: +# Description: +### END INIT INFO + +# See http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit for +# more information on debain init.d scripts, which may help you understand +# this script. + +case "$1" in + start) + # Required start option, for debian init.d scripts + ;; + stop) + # Required stop option, for debian init.d scripts + ;; + restart) + # Required restart option, for debian init.d scripts + ;; + create) + # Create a new server + ;; + delete) + # Delete an existing server, with confirmation + ;; + rename) + # Rename an existing server + ;; + jars) + # Jar commands + case "$2" in + remote) + case "$3" in + create) + ;; + delete) + ;; + rename) + ;; + change) + ;; + getlatest) + ;; + ;; + "") + # Just the "jars" command + ;; + help) + echo -e "Usage: $0 command:" + echo -e + echo -e "--Setup Commands------------------------------------------------" + echo -e " create \t\t\t\tCreates a new Minecraft server" + echo -e " delete \t\t\t\tDeletes an existing Minecraft server" + echo -e " rename \t\t\tRenames an existing Minecraft server" + echo -e + echo -e "--Server Mangement Commands-------------------------------------" + echo -e " start \t\t\t\tStarts a server" + echo -e " stop [now] \t\t\t\tStops a server after warning players, or right now" + echo -e " restart [now] \t\t\tRestarts a server after warning players, or right now" + echo -e " worlds \t\t\t\tLists the worlds a server has" + echo -e " worlds load \t\t\t\tCreates links to wolrds in storage for a server" + echo -e " worlds todisk \t\t\tSynchronises any \"in RAM\" worlds to disk a server has" + echo -e " worlds toram \t\t\tSynchronises any RAM enabled worlds to RAM a server has" + echo -e " worlds backup \t\t\tMakes a backup of all worlds a server has" + echo -e " worlds ram \t\t\tToggles a world's \"in RAM\" status" + echo -e " backup \t\t\t\tMakes a backup of an entire server directory" + echo -e " logroll \t\t\t\tMove a server log to a gziped archive, to reduce lag" + echo -e " connected \t\t\t\tList a servers connected players" + echo -e " status \t\t\t\tShow the running/stopped status of a server" + echo -e + echo -e "--Server Pass Through Commands----------------------------------" + echo -e " wl on|off \t\t\tEnabled/disable server whitelist check" + echo -e " wl add|remove \t\tAdd/remove a player to/from a server's whitelist" + echo -e " wl \t\t\t\t\tList the players whitelisted for a server" + echo -e " bl player add|remove \tBan/pardon a player from/for a server" + echo -e " bl ip add|remove \tBan/pardon an IP address from/for a server" + echo -e " bl \t\t\t\t\tLists the banned players and IP address for a server" + echo -e " op add|remove \t\tAdd/remove operator status for a player on a server" + echo -e " gm survival|creative \tChange the game mode for a player on a server" + echo -e " kick \t\t\tForcibly disconnect a player from a server" + echo -e " say \t\t\tBroadcast a (pink) message to all players on a server" + echo -e " time set|add \t\tSet/increment time on a server (0-24000)" + echo -e " toggledownfall \t\t\tToggles rain and snow on a server" + echo -e " save on|off \t\t\t\tEnable/disable writing world changes to file" + echo -e " save all \t\t\t\tForce the writing of all non-saved world changes to file" + echo -e " cmd \t\t\tSend a command string to the server and return" + echo -e " cmdlog \t\t\tSame as 'cmd' but shows log output afterwards (Ctrl+C to exit)" + echo -e + echo -e "--Jar Commands--------------------------------------------------" + echo -e " jars \t\t\t\t\t\tList the stored jar files." + echo -e " jars remote create \tCreate a new jar directory, with the \"always latest\" download URL" + echo -e " jars remote delete \t\t\tDelete a jar directory" + echo -e " jars remote rename \t\tRename a jar directory" + echo -e " jars remote change \tChange the remove download link for a jar directory" + echo -e " jars remote getlatest \t\t\tDownload the latest jar file" + echo -e + echo -e "--Init.d Commands-----------------------------------------------" + echo -e " start \t\t\t\t\tStarts all active servers" + echo -e " stop \t\t\t\t\t\tStops all running servers" + echo -e " restart \t\t\t\t\tRestarts all active servers" + ;; + *) + # TODO: Check firt if $1 is an existing server name + + case "$2" in + start) + ;; + stop) + ;; + restart) + ;; + worlds) + ;; + backup) + ;; + logroll) + ;; + connected) + ;; + status) + ;; + whitelist) + wl) + ;; + blacklist) + bl) + ;; + operator) + op) + ;; + gamemode) + gm) + ;; + kick) + ;; + say) + ;; + "time") + ;; + toggledownfall) + ;; + save) + ;; + cmd) + ;; + cmdlog) + ;; + ;; +esac + +exit 0 \ No newline at end of file