linux - How can I configure a systemd service to restart periodically? -
i have simple systemd service needs periodically restarted keep process bugging out. there configuration option systemd services periodically restart them? of restart*
options seem pertain restarting service when exits.
yes, can make service restart periodically making service of type=notify
. add option in [service] section of service file along restart=always
, give watchdogsec=xx
, xx time period in second want restart service. here process killed systemd after xx time period , restarted systemd again. eg.
[unit] . . [service] type=notify . . watchdogsec=10 restart=always . . [install] wantedby= ....
Comments
Post a Comment