[crux-commits] ports/contrib (refs/remotes/origin/3.6): lighttpd: tweak; remove MIME types which should not go via web

crux at crux.nu crux at crux.nu
Sat Apr 10 19:05:53 UTC 2021


commit df03ea7a7a512f302cdfa40bdba441c362b34a69
Author: Steffen Nurpmeso <steffen at sdaoden.eu>
Date:   Mon Feb 8 23:08:52 2021 +0100

    lighttpd: tweak; remove MIME types which should not go via web

diff --git a/lighttpd/.signature b/lighttpd/.signature
index d44e02797..e650a31d2 100644
--- a/lighttpd/.signature
+++ b/lighttpd/.signature
@@ -1,7 +1,7 @@
 untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF3wRJKoXohOm6JlwrtMQnud+zyWdZLDtv32SkaUIZYckUDFz6mqGdjlCwepelR2vVieXegfxxJILeS8gN0Ka69Ak=
+RWSagIOpLGJF37ANxB0g2uXgFPVljx0ZgEcNIMVahuYFgGQ/JPBCj+9y+m6EwKvQO415+AsbwHU6ZpyeksTXEASUh8y1LxSR6QQ=
 SHA256 (Pkgfile) = 24282f972a2e9ab5fd0256cfa25a9234db5d64baebdd59a3511d4c03435ad76d
 SHA256 (.footprint) = e97305350f7145b67cf1415a0b4ece4e9809cd3136f5c207d7de7b97c1a2b9bd
 SHA256 (lighttpd-1.4.59.tar.xz) = fb953db273daef08edb6e202556cae8a3d07eed6081c96bd9903db957d1084d5
-SHA256 (lighttpd.rc) = 777e6d46980c9f8b042c649241466e135fc0dce55b7c5caf932b68bf443392c9
-SHA256 (lighttpd.conf) = 7452298dcb6edcaa670113cecb936e2457b4c24112c641a5e356254d3b4955a2
+SHA256 (lighttpd.rc) = b96a244cb1bd3222e76bf4c9954da0c13225109c99e2d406de76a3d231bbb362
+SHA256 (lighttpd.conf) = a67bb077120af4ed073171126e5b33c3e244000731d556e733016a54c1f4d1ff
diff --git a/lighttpd/lighttpd.conf b/lighttpd/lighttpd.conf
index b27105dfe..d80c2ccf7 100644
--- a/lighttpd/lighttpd.conf
+++ b/lighttpd/lighttpd.conf
@@ -53,8 +53,6 @@ server.modules = (
 )
 
 mimetype.assign = ( # {{{
-	".tar.bz2" => "application/x-gtar-compressed",
-	".tar.gz" => "application/x-gtar-compressed",
 	".cbor" => "application/cbor",
 	".efi" => "application/efi",
 	".epub" => "application/epub+zip",
diff --git a/lighttpd/lighttpd.rc b/lighttpd/lighttpd.rc
index 47788f891..6d9ae2343 100755
--- a/lighttpd/lighttpd.rc
+++ b/lighttpd/lighttpd.rc
@@ -8,14 +8,14 @@ OPTS='-f /etc/lighttpd.conf'
 
 case ${1} in
 start)
-   ${SSD} --start --pidfile ${PID} --exec ${PROG} -- ${OPTS}
+   exec ${SSD} --start --pidfile ${PID} --exec ${PROG} -- ${OPTS}
    ;;
 stop)
-   ${SSD} --stop --remove-pidfile --retry 10 --pidfile ${PID}
+   exec ${SSD} --stop --remove-pidfile --retry 10 --pidfile ${PID}
    ;;
 restart)
    ${0} stop
-   ${0} start
+   exec ${0} start
    ;;
 status)
    ${SSD} --status --pidfile ${PID}
diff --git a/lighttpd/post-install b/lighttpd/post-install
index 12317ddb1..bceacb879 100644
--- a/lighttpd/post-install
+++ b/lighttpd/post-install
@@ -4,11 +4,10 @@ usr=lighttpd
 grp=${usr}
 dir=${usr}
 
-getent group ${grp} || groupadd -r ${grp}
-
-if [ -z "`getent passwd ${usr}`" ]; then
-	useradd -r -g ${grp} -d /var/www/${usr} -s /bin/false ${usr}
-	passwd -l ${usr}
-fi
+getent group ${grp} >/dev/null || groupadd -r ${grp}
+getent passwd ${usr} >/dev/null 2>&1 || {
+        useradd -r -g ${grp} -d /var/www/${dir} -s /bin/false ${usr}
+        passwd -l ${usr}
+}
 
 chown ${usr}:daemon /var/log/${usr} /var/lib/${usr}


More information about the crux-commits mailing list