summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/meson.build2
-rw-r--r--examples/minecserver@.service19
-rw-r--r--examples/server.properties4
3 files changed, 13 insertions, 12 deletions
diff --git a/examples/meson.build b/examples/meson.build
index e50f459..5d3564b 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -3,11 +3,11 @@
example_files = [
'eula.txt',
'example.mcserver',
+ 'minecctl.conf',
'minecproxy.conf',
'minecproxy.service',
'minecserver@.service',
'README.TXT',
- 'server.properties',
]
xxd = find_program('xxd')
diff --git a/examples/minecserver@.service b/examples/minecserver@.service
index bb72c5b..40aca86 100644
--- a/examples/minecserver@.service
+++ b/examples/minecserver@.service
@@ -3,29 +3,30 @@ Description=Minecraft Server %i
#Documentation= https://url https://url man:abc
Wants=network-online.target
After=network-online.target
-ConditionFileNotEmpty=%E/minecproxy/config/%i.mcserver
-ConditionPathExists=%E/minecproxy/servers/%i/eula.txt
-ConditionPathExists=%E/minecproxy/servers/%i/server.properties
-ConditionPathExists=%E/minecproxy/servers/%i/server.jar
+ConditionFileNotEmpty=%E/minecproxy/%i.mcserver
+# Unfortunately $XDG_DATA_DIR has no %E equivalent
+ConditionPathExists=%h/.local/share/minecproxy/%i/eula.txt
+ConditionPathExists=%h/.local/share/minecproxy/%i/server.properties
+ConditionPathExists=%h/.local/share/minecproxy/%i/server.jar
[Service]
Type=exec
ExecStart=/usr/bin/java -Xmx1024M -Xms1024M -jar server.jar --nogui
-ExecStop=-/usr/bin/minecctl -c %E/minecproxy/config/ -f stop %i
+ExecStop=-/usr/bin/minecctl -f stop %i
# Optional: this will autogenerate new servers on the fly
-# if this is used, comment out the ConditionPathExists checks above
+# if this is used, comment out all the ConditionPathExists checks above
#ExecStartPre=/usr/bin/minecctl new %i
TimeoutStopSec=120
KillSignal=SIGCONT
Restart=on-failure
-WorkingDirectory=%E/minecproxy/servers/%i
+WorkingDirectory=%h/.local/share/minecproxy/%i
Nice=5
LimitCORE=0
NoNewPrivileges=true
-KeyringMode=private
+KeyringMode=privat
PrivateUsers=true
ProtectSystem=strict
-ReadWritePaths=%E/minecproxy/servers/%i
+ReadWritePaths=%h/.local/share/minecproxy/%i
PrivateDevices=true
ProtectKernelTunables=true
ProtectControlGroups=true
diff --git a/examples/server.properties b/examples/server.properties
index dddb380..c2609cd 100644
--- a/examples/server.properties
+++ b/examples/server.properties
@@ -3,7 +3,7 @@
# fleshed out version the first time the Minecraft
# server is executed.
motd=A Minecraft Server
-server-port=25565
+server-port=24000
enable-rcon=true
-rcon.port=25575
+rcon.port=28000
rcon.password=secret