diff options
| -rw-r--r-- | meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf | 1 | ||||
| -rw-r--r-- | meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb | 20 |
2 files changed, 17 insertions, 4 deletions
diff --git a/meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf b/meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf new file mode 100644 index 0000000000..b7a9f4886e --- /dev/null +++ b/meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf | |||
| @@ -0,0 +1 @@ | |||
| d /run/nostromo - www-data www-data - | |||
diff --git a/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb b/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb index 94c32d8a28..e34fba2607 100644 --- a/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb +++ b/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb | |||
| @@ -7,6 +7,7 @@ SRC_URI = "http://www.nazgul.ch/dev/${BPN}-${PV}.tar.gz \ | |||
| 7 | file://0001-GNUmakefile-add-possibility-to-override-variables.patch \ | 7 | file://0001-GNUmakefile-add-possibility-to-override-variables.patch \ |
| 8 | file://nhttpd.conf \ | 8 | file://nhttpd.conf \ |
| 9 | file://volatiles \ | 9 | file://volatiles \ |
| 10 | file://tmpfiles.conf \ | ||
| 10 | file://nostromo \ | 11 | file://nostromo \ |
| 11 | " | 12 | " |
| 12 | 13 | ||
| @@ -35,18 +36,29 @@ do_install() { | |||
| 35 | install -d ${D}${localstatedir}/nostromo/conf | 36 | install -d ${D}${localstatedir}/nostromo/conf |
| 36 | install -d ${D}${localstatedir}/nostromo/htdocs/cgi-bin | 37 | install -d ${D}${localstatedir}/nostromo/htdocs/cgi-bin |
| 37 | install -d ${D}${localstatedir}/nostromo/icons | 38 | install -d ${D}${localstatedir}/nostromo/icons |
| 38 | install -d ${D}${localstatedir}/log/nostromo | ||
| 39 | install -d ${D}${localstatedir}/run/nostromo | ||
| 40 | install -d ${D}${sysconfdir}/init.d | 39 | install -d ${D}${sysconfdir}/init.d |
| 41 | install -m 0644 conf/mimes ${D}${localstatedir}/nostromo/conf/mimes | 40 | install -m 0644 conf/mimes ${D}${localstatedir}/nostromo/conf/mimes |
| 42 | install -m 0644 ${WORKDIR}/nhttpd.conf ${D}${sysconfdir} | 41 | install -m 0644 ${WORKDIR}/nhttpd.conf ${D}${sysconfdir} |
| 43 | install -m 0755 ${WORKDIR}/nostromo ${D}${sysconfdir}/init.d | 42 | install -m 0755 ${WORKDIR}/nostromo ${D}${sysconfdir}/init.d |
| 44 | install -c -D -m 644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/nostromo | 43 | install -D -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/nostromo |
| 44 | if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 45 | install -D -m 0644 ${WORKDIR}/tmpfiles.conf ${D}${sysconfdir}/tmpfiles.d/nostromo.conf | ||
| 46 | fi | ||
| 45 | install -m 0644 htdocs/index.html ${D}${localstatedir}/nostromo/htdocs/index.html | 47 | install -m 0644 htdocs/index.html ${D}${localstatedir}/nostromo/htdocs/index.html |
| 46 | install -m 0644 htdocs/nostromo.gif ${D}${localstatedir}/nostromo/htdocs/nostromo.gif | 48 | install -m 0644 htdocs/nostromo.gif ${D}${localstatedir}/nostromo/htdocs/nostromo.gif |
| 47 | install -m 0644 icons/dir.gif ${D}${localstatedir}/nostromo/icons/dir.gif | 49 | install -m 0644 icons/dir.gif ${D}${localstatedir}/nostromo/icons/dir.gif |
| 48 | install -m 0644 icons/file.gif ${D}${localstatedir}/nostromo/icons/file.gif | 50 | install -m 0644 icons/file.gif ${D}${localstatedir}/nostromo/icons/file.gif |
| 49 | chown -R www-data:www-data ${D}/${localstatedir}/nostromo ${D}/${localstatedir}/log/nostromo ${D}/${localstatedir}/run/nostromo | 51 | chown -R www-data:www-data ${D}/${localstatedir}/nostromo |
| 50 | } | 52 | } |
| 51 | 53 | ||
| 52 | CONFFILES_${PN} += "/var/nostromo/conf/mimes ${sysconfdir}/nhttpd.conf" | 54 | CONFFILES_${PN} += "/var/nostromo/conf/mimes ${sysconfdir}/nhttpd.conf" |
| 55 | |||
| 56 | pkg_postinst_${PN} () { | ||
| 57 | if [ -z "$D" ]; then | ||
| 58 | if [ -e /sys/fs/cgroup/systemd ]; then | ||
| 59 | systemd-tmpfiles --create | ||
| 60 | elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then | ||
| 61 | ${sysconfdir}/init.d/populate-volatile.sh update | ||
| 62 | fi | ||
| 63 | fi | ||
| 64 | } | ||
