blob: 26345ee5fa886c424656eb115a5d7d4dfcdb8f9d [file] [log] [blame]
Matt Spinlerc9b6e432017-03-15 16:42:54 -05001[Unit]
2Description=Enable reboot on host failures
Deepak Kodihallid9ef80e2017-08-03 13:43:54 -05003Wants=mapper-wait@-xyz-openbmc_project-control-host0-auto_reboot.service
4After=mapper-wait@-xyz-openbmc_project-control-host0-auto_reboot.service
Matt Spinlerc9b6e432017-03-15 16:42:54 -05005
6[Service]
Deepak Kodihallid9ef80e2017-08-03 13:43:54 -05007ExecStart = /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"
8ExecStop = /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 Spinlerc9b6e432017-03-15 16:42:54 -05009Type=oneshot
10RemainAfterExit=yes
11
12[Install]
Patrick Ventured607cfb2019-04-04 12:15:22 -070013WantedBy=multi-user.target