Enable OCC Active on BMC reset reload

Post BMC reset reload, if the host is up, then we deem
the OCCs are present and hence enable Active state.

Fixes openbmc/openbmc#2126

Change-Id: Ife4af19cda0010f55a1067d1b1c1875632ce81aa
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/common/recipes-phosphor/occ/openpower-occ-control/op-occ-enable@.service b/common/recipes-phosphor/occ/openpower-occ-control/op-occ-enable@.service
new file mode 100644
index 0000000..7937382
--- /dev/null
+++ b/common/recipes-phosphor/occ/openpower-occ-control/op-occ-enable@.service
@@ -0,0 +1,15 @@
+[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
+ConditionPathExists=/run/openbmc/host@%i-on
+
+[Service]
+ExecStart=/usr/bin/env occ-active.sh enable
+SyslogIdentifier=occ-active.sh
+Type=oneshot
+
+[Install]
+WantedBy=obmc-host-start@%i.target