diff options
Diffstat (limited to 'meta/recipes-extended/lighttpd')
-rw-r--r-- | meta/recipes-extended/lighttpd/files/lighttpd.service | 12 | ||||
-rw-r--r-- | meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb | 12 |
2 files changed, 23 insertions, 1 deletions
diff --git a/meta/recipes-extended/lighttpd/files/lighttpd.service b/meta/recipes-extended/lighttpd/files/lighttpd.service new file mode 100644 index 0000000000..66a907aa17 --- /dev/null +++ b/meta/recipes-extended/lighttpd/files/lighttpd.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=Lightning Fast Webserver With Light System Requirements | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | ExecStartPre=@SBINDIR@/lighttpd -t -f @SYSCONFDIR@/lighttpd.conf | ||
7 | ExecStart=@SBINDIR@/lighttpd -D -f @SYSCONFDIR@/lighttpd.conf | ||
8 | ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
12 | |||
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb index 6635e31167..c243494686 100644 --- a/meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb +++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb | |||
@@ -22,6 +22,7 @@ SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t | |||
22 | file://index.html.lighttpd \ | 22 | file://index.html.lighttpd \ |
23 | file://lighttpd.conf \ | 23 | file://lighttpd.conf \ |
24 | file://lighttpd \ | 24 | file://lighttpd \ |
25 | file://lighttpd.service \ | ||
25 | " | 26 | " |
26 | 27 | ||
27 | SRC_URI[md5sum] = "8e2d4ae8e918d4de1aeb9842584d170b" | 28 | SRC_URI[md5sum] = "8e2d4ae8e918d4de1aeb9842584d170b" |
@@ -39,16 +40,25 @@ EXTRA_OECONF = " \ | |||
39 | --disable-static \ | 40 | --disable-static \ |
40 | " | 41 | " |
41 | 42 | ||
42 | inherit autotools pkgconfig update-rc.d gettext | 43 | inherit autotools pkgconfig update-rc.d gettext systemd |
43 | 44 | ||
44 | INITSCRIPT_NAME = "lighttpd" | 45 | INITSCRIPT_NAME = "lighttpd" |
45 | INITSCRIPT_PARAMS = "defaults 70" | 46 | INITSCRIPT_PARAMS = "defaults 70" |
46 | 47 | ||
48 | SYSTEMD_SERVICE_${PN} = "lighttpd.service" | ||
49 | |||
47 | do_install_append() { | 50 | do_install_append() { |
48 | install -d ${D}${sysconfdir}/init.d ${D}/www/logs ${D}/www/pages/dav ${D}/www/var | 51 | install -d ${D}${sysconfdir}/init.d ${D}/www/logs ${D}/www/pages/dav ${D}/www/var |
49 | install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d | 52 | install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d |
50 | install -m 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir} | 53 | install -m 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir} |
51 | install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html | 54 | install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html |
55 | |||
56 | install -d ${D}${systemd_unitdir}/system | ||
57 | install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system | ||
58 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
59 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
60 | -e 's,@BASE_BINDIR@,${base_bindir},g' \ | ||
61 | ${D}${systemd_unitdir}/system/lighttpd.service | ||
52 | } | 62 | } |
53 | 63 | ||
54 | FILES_${PN} += "${sysconfdir} /www" | 64 | FILES_${PN} += "${sysconfdir} /www" |