[Unit] Description={{ domain }} Minecraft Server Wants=network.target After=network.target [Service] User={{ system_user }} Group={{ system_user }} Nice=5 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 }} stop ExecStop=/bin/bash -c "while ps -p $MAINPID > /dev/null; do /bin/sleep 1; done"