move state manager service files into its repo
OpenBMC is moving towards individual repos hosting and maintaining their
own service files. This allows the corresponding maintainer more control
over their service file and removes the meta-* layer maintainer from
needing to be involved.
Once this is merged, its bump will need to be combined with a change in
the meta-phosphor layer that removes the service files.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Ib9ebfb16e131bc2743b3fc9fcfdfb7370f455f8f
diff --git a/service_files/phosphor-discover-system-state@.service b/service_files/phosphor-discover-system-state@.service
new file mode 100644
index 0000000..21554c9
--- /dev/null
+++ b/service_files/phosphor-discover-system-state@.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Reboot If Enabled
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
+Wants=mapper-wait@-xyz-openbmc_project-state-host%i.service
+After=mapper-wait@-xyz-openbmc_project-state-host%i.service
+Wants=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
+After=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
+After=op-reset-chassis-on@%i.service
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+
+[Service]
+Restart=no
+Type=oneshot
+ExecStart=/usr/bin/phosphor-discover-system-state --host %i
+
+[Install]
+WantedBy=multi-user.target