Restart=

The systemd service setting that decides when systemd restarts a process that exits, such as on-failure or always.

In more detail

Restart=on-failure restarts after a crash or non-zero exit but not after a clean stop, and RestartSec= sets the delay. systemd also limits how many restarts may happen in a short period, so a crashing service ends up failed instead of looping forever. The journal shows each restart and the exit status that caused it.

Related terms

Taught in

References