maybe chmod 0755 'systemd/system/mariadb.service.d'
maybe chmod 0644 'systemd/system/mariadb.service.d/override.conf'
maybe chmod 0644 'systemd/system/minecraft.service'
+maybe chmod 0644 'systemd/system/minecraft@.service'
maybe chmod 0755 'systemd/system/multi-user.target.wants'
maybe chmod 0755 'systemd/system/netdata.service.d'
maybe chmod 0644 'systemd/system/netdata.service.d/limits.conf'
|_| |_|\___|_|\__, |\__,_|
|___/
-Löste sich doch in jeder italienischen Schule der Schmetterling
-aus der Puppe los!
- -- Goethe, Maximen und Reflektionen, Nr. 1153
+Der Mensch ist bereit, für jede Idee zu sterben, vorausgesetzt, daß
+ihm die Idee nicht ganz klar ist.
+ -- Gilbert Keith Chesterton
Today is Prickle-Prickle, the 36th day of Discord in the YOLD 3187
--- /dev/null
+[Unit]
+Description=Minecraft Server: %i
+
+Wants=network.target
+After=network.target
+
+[Service]
+WorkingDirectory=/home/minecraft/%i
+
+# Users Database is not available for within the unit, only root and minecraft is available, everybody else is nobody
+PrivateUsers=true
+
+User=minecraft
+Group=users
+
+# Read only mapping of /usr /boot and /etc
+ProtectSystem=full
+
+# /home, /root and /run/user seem to be empty from within the unit. It is recommended to enable this setting for all long-running services (in particular network-facing ones).
+ProtectHome=true
+
+# /proc/sys, /sys, /proc/sysrq-trigger, /proc/latency_stats, /proc/acpi, /proc/timer_stats, /proc/fs and /proc/irq will be read-only within the unit.
+# It is recommended to turn this on for most services.
+# Implies MountFlags=slave
+ProtectKernelTunables=true
+
+# Block module system calls, also /usr/lib/modules. It is recommended to turn this on for most services that do not need special file systems or extra kernel modules to work
+# Implies NoNewPrivileges=yes
+ProtectKernelModules=true
+
+# It is hence recommended to turn this on for most services.
+# Implies MountAPIVFS=yes
+ProtectControlGroups=true
+
+#ExecStart=/usr/bin/screen -DmS mc-%i /usr/bin/java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
+
+ExecStart=/bin/sh -c '/usr/bin/screen -DmS mc-%i /usr/bin/java -server -Xms1024M -Xmx1024M -XX:+UseG1GC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -jar minecraft_server.jar nogui'
+
+ExecReload=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "reload"\\015'
+
+ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say SERVER SHUTTING DOWN IN 5 SECONDS. SAVING ALL MAPS..."\015'
+ExecStop=/bin/sleep 5
+ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "save-all"\015'
+ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "stop"\015'
+ExecStop=/bin/sleep 10
+
+Restart=on-failure
+RestartSec=60s
+
+
+[Install]
+WantedBy=multi-user.target
+