Matt Spinler | 8cbb396 | 2017-03-06 11:06:27 -0600 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=Enable reboot on host failures |
| 3 | Wants=mapper-wait@-org-openbmc-settings-host0.service |
| 4 | After=mapper-wait@-org-openbmc-settings-host0.service |
| 5 | |
| 6 | [Service] |
| 7 | ExecStart = /bin/sh -c "busctl set-property `mapper get-service /org/openbmc/settings/host0` /org/openbmc/settings/host0 org.openbmc.settings.Host auto_reboot s \"yes\"" |
| 8 | ExecStop = /bin/sh -c "busctl set-property `mapper get-service /org/openbmc/settings/host0` /org/openbmc/settings/host0 org.openbmc.settings.Host auto_reboot s \"no\"" |
| 9 | Type=oneshot |
| 10 | RemainAfterExit=yes |
| 11 | |
| 12 | [Install] |
| 13 | WantedBy={SYSTEMD_DEFAULT_TARGET} |