blob: 81902ae37267a74fa7efd23fb4861f452383c5f6 [file] [log] [blame]
Matt Spinler8cbb3962017-03-06 11:06:27 -06001[Unit]
2Description=Enable reboot on host failures
3Wants=mapper-wait@-org-openbmc-settings-host0.service
4After=mapper-wait@-org-openbmc-settings-host0.service
5
6[Service]
7ExecStart = /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\""
8ExecStop = /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\""
9Type=oneshot
10RemainAfterExit=yes
11
12[Install]
13WantedBy={SYSTEMD_DEFAULT_TARGET}