Matt Spinler | c9b6e43 | 2017-03-15 16:42:54 -0500 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=Enable reboot on host failures |
Deepak Kodihalli | d9ef80e | 2017-08-03 13:43:54 -0500 | [diff] [blame] | 3 | Wants=mapper-wait@-xyz-openbmc_project-control-host0-auto_reboot.service |
| 4 | After=mapper-wait@-xyz-openbmc_project-control-host0-auto_reboot.service |
Matt Spinler | c9b6e43 | 2017-03-15 16:42:54 -0500 | [diff] [blame] | 5 | |
| 6 | [Service] |
Deepak Kodihalli | d9ef80e | 2017-08-03 13:43:54 -0500 | [diff] [blame] | 7 | ExecStart = /bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/control/host0/auto_reboot` /xyz/openbmc_project/control/host0/auto_reboot xyz.openbmc_project.Control.Boot.RebootPolicy AutoReboot b true" |
| 8 | ExecStop = /bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/control/host0/auto_reboot` /xyz/openbmc_project/control/host0/auto_reboot xyz.openbmc_project.Control.Boot.RebootPolicy AutoReboot b false" |
Matt Spinler | c9b6e43 | 2017-03-15 16:42:54 -0500 | [diff] [blame] | 9 | Type=oneshot |
| 10 | RemainAfterExit=yes |
| 11 | |
| 12 | [Install] |
| 13 | WantedBy={SYSTEMD_DEFAULT_TARGET} |