summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service')
-rw-r--r--meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service b/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service
new file mode 100644
index 0000000000..0cf5e7cd37
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Start Watchdog%i
+Wants=obmc-host-started@%i.target
+After=obmc-host-started@%i.target
+Wants=mapper-wait@-xyz-openbmc_project-watchdog-host%i.service
+After=mapper-wait@-xyz-openbmc_project-watchdog-host%i.service
+Conflicts=obmc-host-stop@%i.target
+ConditionPathExists=!/run/openbmc/host@%i-on
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sh -c "busctl call `mapper get-service /xyz/openbmc_project/watchdog/host%i` /xyz/openbmc_project/watchdog/host%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.State.Watchdog Enabled b true"
+RemainAfterExit=yes
+SyslogIdentifier=obmc-enable-host-watchdog