blob: 67a9aff23d30f742a7d97084f09e49a563ee1ede [file] [log] [blame]
Matt Spinlerc9b6e432017-03-15 16:42:54 -05001[Unit]
2Description=Enable reboot on host failures
3Wants=mapper-wait@-org-openbmc-settings-host%i.service
4After=mapper-wait@-org-openbmc-settings-host%i.service
5
6[Service]
7ExecStart = /bin/sh -c "busctl set-property `mapper get-service /org/openbmc/settings/host%i` /org/openbmc/settings/host%i org.openbmc.settings.Host auto_reboot s \"yes\""
8ExecStop = /bin/sh -c "busctl set-property `mapper get-service /org/openbmc/settings/host%i` /org/openbmc/settings/host%i org.openbmc.settings.Host auto_reboot s \"no\""
9Type=oneshot
10RemainAfterExit=yes
11
12[Install]
13WantedBy={SYSTEMD_DEFAULT_TARGET}