[packages/lighttpd] use variable for main config path

glen glen at pld-linux.org
Fri Sep 28 16:53:57 CEST 2012


commit e4eb660d91aefaacd7bbe220a78c51ffffe95512
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri Sep 28 17:25:19 2012 +0300

    use variable for main config path

 lighttpd.init | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/lighttpd.init b/lighttpd.init
old mode 100644
new mode 100755
index d4012b3..394b120
--- a/lighttpd.init
+++ b/lighttpd.init
@@ -18,6 +18,8 @@ upstart_controlled
 # Get service config
 [ -f /etc/sysconfig/lighttpd ] && . /etc/sysconfig/lighttpd
 
+CONFIGFILE=/etc/lighttpd/lighttpd.conf
+
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
 	if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
@@ -29,7 +31,7 @@ else
 fi
 
 configtest() {
-	env SHELL=/bin/sh lighttpd -t -f /etc/lighttpd/lighttpd.conf $HTTPD_OPTS
+	env SHELL=/bin/sh lighttpd -t -f $CONFIGFILE $HTTPD_OPTS
 }
 
 # wrapper for configtest
@@ -72,10 +74,10 @@ start() {
 	msg_starting "Lighttpd Web Server"; busy
 	if is_yes "${LIGHT_ANGEL}"; then
 		daemon --fork --pidfile /var/run/lighttpd-angel.pid --makepid \
-			env SHELL=/bin/sh lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf $HTTPD_OPTS 1>&2
+			env SHELL=/bin/sh lighttpd-angel -D -f $CONFIGFILE $HTTPD_OPTS 1>&2
 
 	else
-		env SHELL=/bin/sh lighttpd -f /etc/lighttpd/lighttpd.conf $HTTPD_OPTS
+		env SHELL=/bin/sh lighttpd -f $CONFIGFILE $HTTPD_OPTS
 	fi
 	RETVAL=$?
 	if [ $RETVAL -eq 0 ]; then
@@ -140,7 +142,7 @@ reload() {
 		# sending INT signal will make lighttpd close all listening sockets and
 		# wait for client connections to terminate.
 		killproc --pidfile /var/run/lighttpd.pid lighttpd -INT
-		env SHELL=/bin/sh lighttpd -f /etc/lighttpd/lighttpd.conf $HTTPD_OPTS
+		env SHELL=/bin/sh lighttpd -f $CONFIGFILE $HTTPD_OPTS
 	fi
 	RETVAL=$?
 }
@@ -195,7 +197,7 @@ case "$1" in
 	checkconfig 1
 	;;
   show-config)
-	env SHELL=/bin/sh lighttpd -p -f /etc/lighttpd/lighttpd.conf $HTTPD_OPTS
+	env SHELL=/bin/sh lighttpd -p -f $CONFIGFILE $HTTPD_OPTS
 	;;
   status)
 	if is_yes "${LIGHT_ANGEL}"; then
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lighttpd.git/commitdiff/0ba2e99cdddea434151bdf7c34f673acf6b30665



More information about the pld-cvs-commit mailing list