Add Systemd unit files for skeleton applications
Preparing to start these with systemd.
Change-Id: I39a99242cee3e9e17e51356521d29bab5ad7d399
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/common/recipes-phosphor/obmc-phosphor-fan/obmc-control-fan/obmc-max-fans.service b/common/recipes-phosphor/obmc-phosphor-fan/obmc-control-fan/obmc-max-fans.service
new file mode 100644
index 0000000..ad0db5c
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-fan/obmc-control-fan/obmc-max-fans.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Set Fans to Maximum
+Wants=mapper-wait@-org-openbmc-control-fans.service
+After=mapper-wait@-org-openbmc-control-fans.service
+After=obmc-fan-control.target
+
+[Service]
+Type=oneshot
+Restart=no
+ExecStart={sbindir}/mapper call /org/openbmc/control/fans org.openbmc.control.Fans setMax
diff --git a/common/recipes-phosphor/obmc-phosphor-fan/obmc-control-fan/org.openbmc.control.Fans.service b/common/recipes-phosphor/obmc-phosphor-fan/obmc-control-fan/org.openbmc.control.Fans.service
new file mode 100644
index 0000000..9fead8f
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-fan/obmc-control-fan/org.openbmc.control.Fans.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Phosphor Fan Control
+Wants=obmc-fans-ready.target
+After=obmc-fans-ready.target
+Wants=obmc-fan-control.target
+Before=obmc-fan-control.target
+
+[Service]
+Restart=always
+ExecStart={sbindir}/fan_control.py
+Type=dbus
+BusName={BUSNAME}
+Environment="PYTHONUNBUFFERED=1"
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}