1
0
This repository has been archived on 2025-01-31. You can view files and clone it, but cannot push or open issues or pull requests.
Files
defaults
handlers
tasks
templates
env
eula.txt
install-modpack.sh
minecraft@.service
start-server.sh
stop-server.sh
.gitignore
README.md

35 lines
727 B
Desktop File

#
# Licensed under the terms of the MIT license
# Source: https://github.com/agowa338/MinecraftSystemdUnit/
# vim:ft=dosini:
#
[Unit]
Description=Minecraft Server %i
After=network.target
[Service]
User=minecraft
Group=minecraft
WorkingDirectory={{ minecraft_home }}/%i
EnvironmentFile={{ minecraft_home }}/%i/env
PrivateUsers=true
ProtectSystem=full
ProtectHome=true
# Implies MountFlags=slave
ProtectKernelTunables=true
# Implies NoNewPrivileges=yes
ProtectKernelModules=true
# Implies MountAPIVFS=yes
ProtectControlGroups=true
ExecStart={{ minecraft_home }}/%i/start-server.sh
ExecStop={{ minecraft_home }}/%i/stop-server.sh
Restart=always
# Restart after 24hrs
RuntimeMaxSecs=86400
[Install]
WantedBy=multi-user.target