MineOS 0.5.x features a complete re-write of the MineOS scripts to address many of the largest annoyances of 0.4.x.
- Namely, 'status' will be almost entirely irrelevant to admins.
- lock-file-based server checking changed to PID-based checking.
- Changed syntax for mineos_console.py
The recommended command syntax has changed, passing server_name as a named argument, rather than just a parsed string. For existing installations, however, backward compatibility has been maintained. For each of the commands, recommended syntax is as follows:
cd /usr/games/minecraft ./mineos_console.py -s servername command [args ...]
|command||preferred syntax||compatibility syntax||description||notes|
|create||-s servername create||create servername||create a new server||creates /home/mc/server/servername, server.config and server.properties|
|start||-s servername start||start servername||starts a previously created server|
|stop||-s servername stop||stop servername||stops a currently running server|
|kill||-s servername kill||kill servername||kills a running minecraft process|
|restart||-s servername restart seconds||restarts a running minecraft process||will start a downed server|
|archive||-s servername archive||archives servername||archives the server to a .tar.gz file||located in /home/mc/archive|
|backup||-s servername backup||backup servername||creates a restore point of a down or up server||located in /home/mc/backup|
|restore||-s servername restore interval||restore servername interval||returns server to a previous restore point||See rdiff-backup. Fails if server exists at /home/mc/servers/servername|
|restore||-s servername restore interval force||restore servername interval force||returns server to a previous restore point||See rdiff-backup. Overwrites existing server (if any) at /home/mc/servers/servername|
|prune||-s servername prune interval||prune servername interval||removes restore points older than interval||See rdiff-backup.|
|get||-s servername get property||prints properties about your server to the command line||example properties: pid, port, memory, up, cmdline|
|set||-s servername set property argument||changes property to value argument||example: set profile vanilla|
|console||-s servername console say hello there, fellow players!||passes text to the server console|
|console-ro||-s servername console-ro time||prints live server-console updates to the command line for time seconds|
|console-rw||-s servername console-rw||attaches to server's screen instance, allowing interactive commands|
|update_profile||update_profile profilename||Downloads and updates profilename||Retrieves file in mineos.config, downloads, extracts (if necessary)|
|propogate_profiles||propogate_profiles||Updates all live server jars||Downloads files from internet, copies to live space|
|import_world||-s new_server_name import_world archive_file||Extracts an archived world to new_server_name directory|
|archive_log||-s servername archive_log||Gzips and archives the server.log file||Works only on servers that are not live|
|change_sp||-s servername change_sp server-port portnum||Changes a value in server.properties|
|gamemacro_execute||Executes a predefined game macro/bash macro||Not yet documented|
|up||up stop||Executes a command against all servers currently up||This only works for argument-less commands (e.g., stop, kill)|
|all||all backup||Executes a command against all servers, whether up or down||This only works for argument-less commands (e.g., stop, kill)|
Profiles are new to 0.5.x to address the idea of having multiple, parallel Minecraft configurations side-by-side. This setup, however, should allow for better testing on new versions. As before, plugins directories are specific to each server, not to the profile. To get more acquainted with profiles, see the Youtube video on operating the webui.
mineos.config has changed from the previous version and will contain lines like this:
[downloads] vanilla_jar = http://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar bukkit_jar = http://dl.bukkit.org/latest-rb/craftbukkit.jar tekkit_zip = http://mirror.technicpack.net/files/Tekkit_Server_3.0.4.zip [vanilla] jar_args = nogui jar_file = minecraft_server.jar [bukkit] jar_args = jar_file = craftbukkit.jar [tekkit] jar_args = jar_file = Tekkit.jar zip_file = tekkit.zip [update] vanilla = true bukkit = true tekkit = true
Take note of the very particular syntax here, as it is the key to setting up new profiles.
vanilla_jar = http://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar ... [vanilla] jar_args = nogui jar_file = minecraft_server.jar [update] vanilla = true
- vanilla_jar signifies a profile, called vanilla, which is distributed via the internet as a jarfile.
- [vanilla] is the corresponding section which indicates profile-specific settings.
- jar_args are the default arguments to execute the jar.
- jar_file is the filename the MineOS should save the file on the hard drive as.
- vanilla = true determines whether this profile should be updated from the internet automatically.
tekkit, canary, etc. profiles
A profile_jar configuration is very straightforward. Download and run. Tekkit, on the other hand, requires extraction.
tekkit_zip = http://mirror.technicpack.net/files/Tekkit_Server_3.0.4.zip ... [tekkit] jar_args = jar_file = Tekkit.jar [update] tekkit= true
The _zip indicates that the file downloaded must be extracted first. When it is extracted, it should use the Tekkit.jar file within.
Take note that the URL is a versioned URL (3.0.4), which might be desirable or not, depending on whether you want a profile to auto-update to the latest version, or if you want it to remain the same forever.
Thus, creating a new profile is as easy as recreating the above few sections and attributes. From the web-ui or the command line, you can toggle between profiles at will, allowing you run and test the servers with minimal work.
Profiles actually are robust enough to handle shell scripts .sh and non-executing archives, such as c10t. More information on using profiles for these to come soon.
When referring to minecraft-mod profiles, you can set a server to use them using the command line:
cd /usr/games/minecraft ./mineos_console.py -s servername set profile tekkit