diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2017-08-22 17:57:38 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-08-28 11:06:04 +0200 |
commit | 1f9601bd037507eb4ca02cb738749a2739eb82eb (patch) | |
tree | b66635930816d36ab4e3b7041b396f3baeda01ec | |
parent | 49d17c6533b1b9d5ed485e101564baa1a44a9f90 (diff) | |
download | meta-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.service | 15 | ||||
-rw-r--r-- | meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb | 11 |
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] | ||
2 | Description=Webmin Admin Tool | ||
3 | Requires=local-fs.target | ||
4 | After=basic.target | ||
5 | Conflicts=shutdown.target | ||
6 | |||
7 | [Service] | ||
8 | Type=oneshot | ||
9 | RemainAfterExit=yes | ||
10 | ExecStart=@SYSCONFDIR@/webmin/start | ||
11 | ExecStop=@SYSCONFDIR@/webmin/stop | ||
12 | ExecReload=@SYSCONFDIR@/webmin/reload | ||
13 | |||
14 | [Install] | ||
15 | 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 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 | ||
23 | SRC_URI[md5sum] = "cd6ee98f73f9418562197675b952d81b" | 24 | SRC_URI[md5sum] = "cd6ee98f73f9418562197675b952d81b" |
24 | SRC_URI[sha256sum] = "c66caa9e4cb50d5447bc8aceb7989d2284dde060278f404b13e171c7ce1690e1" | 25 | SRC_URI[sha256sum] = "c66caa9e4cb50d5447bc8aceb7989d2284dde060278f404b13e171c7ce1690e1" |
25 | 26 | ||
26 | inherit perlnative update-rc.d | 27 | inherit perlnative update-rc.d systemd |
27 | 28 | ||
28 | do_configure() { | 29 | do_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() { | |||
117 | INITSCRIPT_NAME = "webmin" | 123 | INITSCRIPT_NAME = "webmin" |
118 | INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." | 124 | INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." |
119 | 125 | ||
126 | SYSTEMD_SERVICE_${PN} = "webmin.service" | ||
127 | SYSTEMD_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 |
121 | RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict" | 130 | RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict" |
122 | RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader" | 131 | RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader" |