diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2014-08-25 14:47:20 +0800 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-08-27 12:49:20 +0200 |
| commit | 49cb17b4978bf586311f5b8ab4b1b3810098c297 (patch) | |
| tree | f3fbedd3cff15ff3c662e2d0b06a732491e72d8e /meta-webserver | |
| parent | 44834de2a3651cb84c8f46489fb6a5f75d6a6787 (diff) | |
| download | meta-openembedded-49cb17b4978bf586311f5b8ab4b1b3810098c297.tar.gz | |
apache2: add systemd unit file
Add systemd unit file for apache2.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-webserver')
| -rw-r--r-- | meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb | 13 | ||||
| -rw-r--r-- | meta-webserver/recipes-httpd/apache2/files/apache2.service | 14 |
2 files changed, 25 insertions, 2 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb index 614dd4e7d5..035602934b 100644 --- a/meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb +++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb | |||
| @@ -18,7 +18,8 @@ SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \ | |||
| 18 | file://npn-patch-2.4.7.patch \ | 18 | file://npn-patch-2.4.7.patch \ |
| 19 | file://0001-configure-use-pkg-config-for-PCRE-detection.patch \ | 19 | file://0001-configure-use-pkg-config-for-PCRE-detection.patch \ |
| 20 | file://init \ | 20 | file://init \ |
| 21 | file://apache2-volatile.conf" | 21 | file://apache2-volatile.conf \ |
| 22 | file://apache2.service" | ||
| 22 | 23 | ||
| 23 | LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83" | 24 | LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83" |
| 24 | SRC_URI[md5sum] = "44543dff14a4ebc1e9e2d86780507156" | 25 | SRC_URI[md5sum] = "44543dff14a4ebc1e9e2d86780507156" |
| @@ -26,7 +27,10 @@ SRC_URI[sha256sum] = "176c4dac1a745f07b7b91e7f4fd48f9c48049fa6f088efe758d61d9738 | |||
| 26 | 27 | ||
| 27 | S = "${WORKDIR}/httpd-${PV}" | 28 | S = "${WORKDIR}/httpd-${PV}" |
| 28 | 29 | ||
| 29 | inherit autotools update-rc.d pkgconfig | 30 | inherit autotools update-rc.d pkgconfig systemd |
| 31 | |||
| 32 | SYSTEMD_SERVICE_${PN} = "apache2.service" | ||
| 33 | SYSTEMD_AUTO_ENABLE_${PN} = "disable" | ||
| 30 | 34 | ||
| 31 | SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice" | 35 | SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice" |
| 32 | 36 | ||
| @@ -81,6 +85,11 @@ do_install_append() { | |||
| 81 | install -d ${D}${sysconfdir}/tmpfiles.d/ | 85 | install -d ${D}${sysconfdir}/tmpfiles.d/ |
| 82 | install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ | 86 | install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ |
| 83 | fi | 87 | fi |
| 88 | |||
| 89 | install -d ${D}${systemd_unitdir}/system | ||
| 90 | install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system | ||
| 91 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service | ||
| 92 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service | ||
| 84 | } | 93 | } |
| 85 | 94 | ||
| 86 | SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess" | 95 | SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess" |
diff --git a/meta-webserver/recipes-httpd/apache2/files/apache2.service b/meta-webserver/recipes-httpd/apache2/files/apache2.service new file mode 100644 index 0000000000..f4bcf9efaf --- /dev/null +++ b/meta-webserver/recipes-httpd/apache2/files/apache2.service | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | [Unit] | ||
| 2 | Decription=The Apache HTTP Server | ||
| 3 | After=network.target remote-fs.target nss-lookup.target | ||
| 4 | |||
| 5 | [Service] | ||
| 6 | Type=simple | ||
| 7 | Environment=LANG=C | ||
| 8 | ExecStart=@SBINDIR@/httpd -DFOREGROUND -D SSL -D PHP5 -k start | ||
| 9 | ExecStop=@BASE_BINDIR@/kill -WINCH ${MAINPID} | ||
| 10 | KillSignal=SIGCONT | ||
| 11 | PrivateTmp=true | ||
| 12 | |||
| 13 | [Install] | ||
| 14 | WantedBy=multi-user.target | ||
