summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta-openpower/recipes-bsp/ecmd/croserver_git.bb7
-rw-r--r--meta-openpower/recipes-bsp/ecmd/files/croserver.service12
2 files changed, 19 insertions, 0 deletions
diff --git a/meta-openpower/recipes-bsp/ecmd/croserver_git.bb b/meta-openpower/recipes-bsp/ecmd/croserver_git.bb
index a788e6164..01005f8fa 100644
--- a/meta-openpower/recipes-bsp/ecmd/croserver_git.bb
+++ b/meta-openpower/recipes-bsp/ecmd/croserver_git.bb
@@ -7,6 +7,8 @@ SRC_URI = "git://github.com/open-power/eCMD.git"
SRCREV = "6c0348b12c95b3bd6e8d8003f9ff743d25400ae2"
DEPENDS += "python-native zlib"
+SRC_URI += "file://croserver.service"
+
S = "${WORKDIR}/git"
# Add the hash style option here to Work around this warning:
@@ -26,4 +28,9 @@ do_compile() {
do_install() {
install -d ${D}${bindir}
install -m 0755 out_obj/lib/server1p ${D}${bindir}/croserver
+
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/croserver.service ${D}${systemd_system_unitdir}/
}
+
+FILES_${PN} += "${systemd_system_unitdir}/croserver.service"
diff --git a/meta-openpower/recipes-bsp/ecmd/files/croserver.service b/meta-openpower/recipes-bsp/ecmd/files/croserver.service
new file mode 100644
index 000000000..38d1fd2ff
--- /dev/null
+++ b/meta-openpower/recipes-bsp/ecmd/files/croserver.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Cronus Server
+Documentation=https://github.com/open-power/eCMD/
+After=network.service
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/croserver
+Restart=on-failure
+ProtectHome=yes
+ProtectSystem=full
+RestrictAddressFamilies=AF_UNIX