summaryrefslogtreecommitdiff
path: root/meta-amd/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service')
-rw-r--r--meta-amd/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta-amd/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service b/meta-amd/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
new file mode 100644
index 0000000000..92c0395014
--- /dev/null
+++ b/meta-amd/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Power Cycle Host Server
+Requires=xyz.openbmc_project.Chassis.Control.Power.service
+After=xyz.openbmc_project.Chassis.Control.Power.service
+
+[Service]
+Type=oneshot
+ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Off
+ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
+ExecStart=sleep 6
+ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.On
+SyslogIdentifier=phosphor-watchdog