aboutsummaryrefslogtreecommitdiff
path: root/example.conf
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-01-08 15:58:27 +0100
committerKarel Kočí <cynerd@email.cz>2016-01-08 15:58:27 +0100
commitb0ad3b14a12bf3725cfd571036dba7e5664d4f57 (patch)
tree574e888560178362ea50d123b0357276b067ac7d /example.conf
parentdd1ac5ec7f33a84370222100b7f51be742725768 (diff)
downloadmcserver-wrapper-b0ad3b14a12bf3725cfd571036dba7e5664d4f57.tar.gz
mcserver-wrapper-b0ad3b14a12bf3725cfd571036dba7e5664d4f57.tar.bz2
mcserver-wrapper-b0ad3b14a12bf3725cfd571036dba7e5664d4f57.zip
Change conf format and add multiple servers support
This commit changes format of configuration files. It should now contains classes that represents different Minecraft servers. Minecraft server handling functionality implemented across whole mcwrapper script is now in one class MCServer. Instancing this class initializes new server and such server can be started and stopped on demand during mcwrapper execution. This allows execution of multiple Minecraft server under single mcwrapper instance, but this is not supported by command line interface. This feature will be used by new feature, man in the middle, that have to be implemented yes.
Diffstat (limited to 'example.conf')
-rw-r--r--example.conf33
1 files changed, 25 insertions, 8 deletions
diff --git a/example.conf b/example.conf
index 6b8cf8f..a267735 100644
--- a/example.conf
+++ b/example.conf
@@ -1,12 +1,29 @@
# This is exaple configuration for mcwrapper
# Use Python3 syntax to specify configuration.
-# For full list of configuration options refer to documentation.
+##############################################
-identifier = 'exampleserver'
+# This is default identifier. It is used if no identifier is provided as argument
+# to mcwrapper. This is specially handy when you have only one identifier to be
+# run all the time.
+# Uncommenting this option if you want such feature.
+#identifier = 'exampleserver'
-server = dict()
-server["exampleserver"] = {
- "directory": '~/minecraft',
- "command": "java -jar mcs.jar nogui",
- "status": '/dev/shm/mcwrapper-exampleserver',
- }
+class exampleserver:
+ # Directory in which Minecraft server will be executed. It is where its files
+ # will be placed
+ directory = '~/minecraft',
+ # Command to start Minecraft server. It is executed in directory specified in
+ # option "directory".
+ # Suggested is to always append "nogui" no disable graphical interface.
+ command = "java -jar mcs.jar nogui",
+ # Directory where wrapper writes files signaling status of server and online
+ # players.
+ # In default it points to directory in /dev/shm. This means that files are in
+ # such case stored only in ram.
+ statusdir = '/dev/shm/mcwrapper-exampleserver',
+ # Automatic server shutdown when no player is online. This option defines time
+ # in minutes before that happens. It is measured from time of last player
+ # leaving server.
+ # Set this value to less or equal zero or comment it to disable automatic
+ # shutdown.
+ timeout = 15