blob: 81902ae37267a74fa7efd23fb4861f452383c5f6 [file] [log] [blame]
[Unit]
Description=Enable reboot on host failures
Wants=mapper-wait@-org-openbmc-settings-host0.service
After=mapper-wait@-org-openbmc-settings-host0.service
[Service]
ExecStart = /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\""
ExecStop = /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\""
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy={SYSTEMD_DEFAULT_TARGET}