Adrien 2b0103808a
Update template.service
Implement auto-restart with systemd
2024-07-20 09:29:05 +07:00

16 lines
346 B
Desktop File

[Unit]
Description=${pkg.name}
After=syslog.target
[Service]
User=${pkg.user}
ExecStart=${pkg.installFolder}/bin/${pkg.name}.jar
SuccessExitStatus=143
# Service shall be restarted in 30 seconds when the service process exits, is killed, or a timeout is reached.
Restart=always # default 'no'
RestartSec=30
[Install]
WantedBy=multi-user.target