Systemd: automatically restart after failure

With systemd you can configure the service so that it automaticaly restarts the service in case the service crashes.
It’s enough to add the “restart” option to the [service] stanza within the service systemd configuraiton file.
See example below. Of course, you need to reload the systemd file in order to active it.

[Service]
Restart=on-failure
RestartSec=240s
Share your love