summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-phosphor/chassis/obmc-host-failure-reboots/host-failure-reboots@.service
blob: 67a9aff23d30f742a7d97084f09e49a563ee1ede (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
[Unit]
Description=Enable reboot on host failures
Wants=mapper-wait@-org-openbmc-settings-host%i.service
After=mapper-wait@-org-openbmc-settings-host%i.service

[Service]
ExecStart = /bin/sh -c "busctl set-property `mapper get-service /org/openbmc/settings/host%i` /org/openbmc/settings/host%i org.openbmc.settings.Host auto_reboot s \"yes\""
ExecStop = /bin/sh -c "busctl set-property `mapper get-service /org/openbmc/settings/host%i` /org/openbmc/settings/host%i org.openbmc.settings.Host auto_reboot s \"no\""
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy={SYSTEMD_DEFAULT_TARGET}
OpenPOWER on IntegriCloud