You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
778 B
INI
30 lines
778 B
INI
[Unit]
|
|
Description={{ domain }} Minecraft Server
|
|
Wants=network.target
|
|
After=network.target
|
|
|
|
[Service]
|
|
User={{ system_user }}
|
|
Group={{ system_user }}
|
|
Nice=2
|
|
KillMode=none
|
|
SuccessExitStatus=0 1
|
|
|
|
ProtectHome=true
|
|
ProtectSystem=full
|
|
PrivateDevices=true
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
InaccessibleDirectories=/root /sys /srv -/opt /media -/lost+found
|
|
ReadOnlyDirectories={{ installation_directory }}
|
|
ReadWriteDirectories={{ data_directory }}
|
|
WorkingDirectory={{ data_directory }}
|
|
ExecStart={{ launch_script }}
|
|
ExecStop={{ remote_control_script }} "say Server will be restarted in 5 seconds"
|
|
ExecStop=/usr/bin/sleep 5
|
|
ExecStop={{ remote_control_script }} stop
|
|
ExecStop=/bin/bash -c "while ps -p $MAINPID > /dev/null; do /bin/sleep 1; done"
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|