[oe-commits] [meta-openembedded] 11/33: webmin: add systemd service file

git at git.openembedded.org git at git.openembedded.org
Thu Aug 24 14:23:34 UTC 2017


This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit 40916b02c3c7e86a082a94c64f3be7fde6c611e4
Author: Chen Qi <Qi.Chen at windriver.com>
AuthorDate: Tue Aug 22 17:57:38 2017 +0800

    webmin: add systemd service file
    
    Add systemd service file for webmin.
    
    Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 .../recipes-webadmin/webmin/files/webmin.service          | 15 +++++++++++++++
 meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb    | 11 ++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/meta-webserver/recipes-webadmin/webmin/files/webmin.service b/meta-webserver/recipes-webadmin/webmin/files/webmin.service
new file mode 100644
index 0000000..87cf4f9
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/webmin.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Webmin Admin Tool
+Requires=local-fs.target
+After=basic.target
+Conflicts=shutdown.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@SYSCONFDIR@/webmin/start
+ExecStop=@SYSCONFDIR@/webmin/stop
+ExecReload=@SYSCONFDIR@/webmin/reload
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb b/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb
index 6acff03..ae88eb6 100644
--- a/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb
+++ b/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb
@@ -18,12 +18,13 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \
            file://media-tomb.patch \
            file://remove-python2.3.patch \
            file://mysql-config-fix.patch \
+           file://webmin.service \
             "
 
 SRC_URI[md5sum] = "cd6ee98f73f9418562197675b952d81b"
 SRC_URI[sha256sum] = "c66caa9e4cb50d5447bc8aceb7989d2284dde060278f404b13e171c7ce1690e1"
 
-inherit perlnative update-rc.d
+inherit perlnative update-rc.d systemd
 
 do_configure() {
     # Remove binaries and plugins for other platforms
@@ -77,6 +78,11 @@ do_install() {
     install -d ${D}${sysconfdir}/init.d
     install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin
 
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/webmin.service ${D}${systemd_unitdir}/system
+    sed -i -e 's, at SYSCONFDIR@,${sysconfdir},g' \
+           ${D}${systemd_unitdir}/system/webmin.service
+
     install -d ${D}${localstatedir}
     install -d ${D}${localstatedir}/webmin
 
@@ -117,6 +123,9 @@ do_install() {
 INITSCRIPT_NAME = "webmin"
 INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ."
 
+SYSTEMD_SERVICE_${PN} = "webmin.service"
+SYSTEMD_AUTO_ENABLE_${PN} = "disable"
+
 # FIXME: some of this should be figured out automatically
 RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict"
 RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list