Add "Restart=always" to the systemd unit file
The health-monitor daemon is not one-shot and should restart when it
gets terminated, so adding "Restart=always" to the systemd unit file.
Tested:
Before this change:
root@bmc:~# pidof health-monitor
310
root@bmc:~# kill -9 310
root@bmc:~# pidof health-monitor
root@bmc:~# # (Does not restart)
After this change:
root@bmc:~# pidof health-monitor
12839
root@bmc:~# kill -9 12839
root@bmc:~# pidof health-monitor
12904
Signed-off-By: Sui Chen <suichen@google.com>
Change-Id: I7a2402bdeb2de369cbaac1dd7c698812948a7003
diff --git a/phosphor-health-monitor.service.in b/phosphor-health-monitor.service.in
index 47b1532..011b1b0 100644
--- a/phosphor-health-monitor.service.in
+++ b/phosphor-health-monitor.service.in
@@ -4,6 +4,7 @@
[Service]
ExecStart=@bindir@/health-monitor
Type=dbus
+Restart=always
BusName=xyz.openbmc_project.HealthMon
SyslogIdentifier=phosphor-health-monitor