lighttpd: source default file from startup script
authorPhilipp Skadorov <philipp.skadorov@savoirfairelinux.com>
Wed, 8 Mar 2017 20:43:32 +0000 (15:43 -0500)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 9 Mar 2017 20:52:39 +0000 (21:52 +0100)
lighttpd server runs cgi application that has no way to get environment
variables that are set up for it.

S50lighttpd is changed to source /etc/default/lighttpd file where these
environment variables can be set up.

Signed-off-by: Philipp Skadorov <philipp.skadorov@savoirfairelinux.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/lighttpd/S50lighttpd

index 7a14ec8a90ced2df24c915acda7ccc92a49309c7..b3518cd278ce4bf9c7d3946015619f470c4802e0 100644 (file)
@@ -7,6 +7,8 @@ DAEMON=/usr/sbin/$NAME
 PID_FILE="/var/run/$NAME.pid"
 CONF_FILE="/etc/$NAME/$NAME.conf"
 
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
 start() {
        printf "Starting lighttpd: "
        start-stop-daemon -S -q -p $PID_FILE --exec $DAEMON -- -f $CONF_FILE