Matt Spinler | ab0a927 | 2017-03-15 16:42:54 -0500 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=Enable reboot on host failures |
Deepak Kodihalli | bfa5f4f | 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 | ab0a927 | 2017-03-15 16:42:54 -0500 | [diff] [blame] | 5 | |
| 6 | [Service] |
Deepak Kodihalli | bfa5f4f | 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 | ab0a927 | 2017-03-15 16:42:54 -0500 | [diff] [blame] | 9 | Type=oneshot |
| 10 | RemainAfterExit=yes |
| 11 | |
| 12 | [Install] |
Brad Bishop | fc81e38 | 2019-04-06 13:58:07 -0400 | [diff] [blame] | 13 | WantedBy=multi-user.target |