blob: 26345ee5fa886c424656eb115a5d7d4dfcdb8f9d [file] [log] [blame]
Matt Spinlerab0a9272017-03-15 16:42:54 -05001[Unit]
2Description=Enable reboot on host failures
Deepak Kodihallibfa5f4f2017-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 Spinlerab0a9272017-03-15 16:42:54 -05005
6[Service]
Deepak Kodihallibfa5f4f2017-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 Spinlerab0a9272017-03-15 16:42:54 -05009Type=oneshot
10RemainAfterExit=yes
11
12[Install]
Brad Bishopfc81e382019-04-06 13:58:07 -040013WantedBy=multi-user.target