summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2017-08-22 17:57:38 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2017-08-28 11:06:04 +0200
commit1f9601bd037507eb4ca02cb738749a2739eb82eb (patch)
treeb66635930816d36ab4e3b7041b396f3baeda01ec
parent49d17c6533b1b9d5ed485e101564baa1a44a9f90 (diff)
downloadmeta-openembedded-1f9601bd037507eb4ca02cb738749a2739eb82eb.tar.gz
webmin: add systemd service file
Add systemd service file for webmin. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/webmin.service15
-rw-r--r--meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb11
2 files changed, 25 insertions, 1 deletions
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 000000000..87cf4f99d
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/webmin.service
@@ -0,0 +1,15 @@
1[Unit]
2Description=Webmin Admin Tool
3Requires=local-fs.target
4After=basic.target
5Conflicts=shutdown.target
6
7[Service]
8Type=oneshot
9RemainAfterExit=yes
10ExecStart=@SYSCONFDIR@/webmin/start
11ExecStop=@SYSCONFDIR@/webmin/stop
12ExecReload=@SYSCONFDIR@/webmin/reload
13
14[Install]
15WantedBy=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 6acff033a..ae88eb673 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 \
18 file://media-tomb.patch \ 18 file://media-tomb.patch \
19 file://remove-python2.3.patch \ 19 file://remove-python2.3.patch \
20 file://mysql-config-fix.patch \ 20 file://mysql-config-fix.patch \
21 file://webmin.service \
21 " 22 "
22 23
23SRC_URI[md5sum] = "cd6ee98f73f9418562197675b952d81b" 24SRC_URI[md5sum] = "cd6ee98f73f9418562197675b952d81b"
24SRC_URI[sha256sum] = "c66caa9e4cb50d5447bc8aceb7989d2284dde060278f404b13e171c7ce1690e1" 25SRC_URI[sha256sum] = "c66caa9e4cb50d5447bc8aceb7989d2284dde060278f404b13e171c7ce1690e1"
25 26
26inherit perlnative update-rc.d 27inherit perlnative update-rc.d systemd
27 28
28do_configure() { 29do_configure() {
29 # Remove binaries and plugins for other platforms 30 # Remove binaries and plugins for other platforms
@@ -77,6 +78,11 @@ do_install() {
77 install -d ${D}${sysconfdir}/init.d 78 install -d ${D}${sysconfdir}/init.d
78 install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin 79 install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin
79 80
81 install -d ${D}${systemd_unitdir}/system
82 install -m 0644 ${WORKDIR}/webmin.service ${D}${systemd_unitdir}/system
83 sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
84 ${D}${systemd_unitdir}/system/webmin.service
85
80 install -d ${D}${localstatedir} 86 install -d ${D}${localstatedir}
81 install -d ${D}${localstatedir}/webmin 87 install -d ${D}${localstatedir}/webmin
82 88
@@ -117,6 +123,9 @@ do_install() {
117INITSCRIPT_NAME = "webmin" 123INITSCRIPT_NAME = "webmin"
118INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." 124INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ."
119 125
126SYSTEMD_SERVICE_${PN} = "webmin.service"
127SYSTEMD_AUTO_ENABLE_${PN} = "disable"
128
120# FIXME: some of this should be figured out automatically 129# FIXME: some of this should be figured out automatically
121RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict" 130RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict"
122RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader" 131RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader"