Move the service files to the occ-control repo

To align with the OpenBMC direction, the OCC service files are being
moved into the owning repo, instead of in the meta-openpower directories
in openbmc.

Change-Id: Icef03a173249dd559f7ae41a8026b11656004d53
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/service_files/meson.build b/service_files/meson.build
new file mode 100644
index 0000000..4bbce89
--- /dev/null
+++ b/service_files/meson.build
@@ -0,0 +1,15 @@
+unit_files = [
+   'org.open_power.OCC.Control.service',
+   'op-occ-disable@.service',
+   'op-occ-enable@.service'
+]
+
+foreach u : unit_files
+    configure_file(
+        copy: true,
+        input: u,
+        install: true,
+        install_dir: systemd_system_unit_dir,
+        output: u,
+        )
+endforeach
diff --git a/service_files/op-occ-disable@.service b/service_files/op-occ-disable@.service
new file mode 100644
index 0000000..dfa3935
--- /dev/null
+++ b/service_files/op-occ-disable@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OpenPOWER OCC Active Disable
+Before=obmc-host-stop-pre@%i.target
+Before=op-enter-mpreboot@%i.service
+Before=op-stop-instructions@%i.service
+Conflicts=op-occ-enable@%i.service
+
+[Service]
+ExecStart=/usr/bin/occ-active.sh disable
+Type=oneshot
+
+[Install]
+WantedBy=obmc-host-stop@%i.target
diff --git a/service_files/op-occ-enable@.service b/service_files/op-occ-enable@.service
new file mode 100644
index 0000000..5431101
--- /dev/null
+++ b/service_files/op-occ-enable@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OpenPOWER OCC Active Enable for host %I
+Conflicts=obmc-host-stop@%i.target
+Conflicts=op-occ-disable@%i.service
+Wants=org.open_power.OCC.Control.service
+After=org.open_power.OCC.Control.service
+Wants=fsi-scan@%i.service
+After=fsi-scan@%i.service
+ConditionPathExists=/run/openbmc/host@%i-on
+
+[Service]
+ExecStart=/usr/bin/occ-active.sh enable
+Type=oneshot
+
+[Install]
+WantedBy=obmc-host-start@%i.target
diff --git a/service_files/org.open_power.OCC.Control.service b/service_files/org.open_power.OCC.Control.service
new file mode 100644
index 0000000..d371d6a
--- /dev/null
+++ b/service_files/org.open_power.OCC.Control.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=OpenPOWER OCC controller
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+Wants=obmc-host-reset-running@0.target
+After=obmc-host-reset-running@0.target
+Wants=xyz.openbmc_project.Logging.service
+After=xyz.openbmc_project.Logging.service
+Wants=xyz.openbmc_project.PLDM
+After=xyz.openbmc_project.PLDM
+
+[Service]
+ExecStart=/usr/bin/openpower-occ-control
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target