From 8f80a943c3fec3b45b2baddd3e01196e93e3b957 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 28 Sep 2012 17:29:02 +0300 Subject: [PATCH] variable for daemon processes --- lighttpd.init | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lighttpd.init b/lighttpd.init index 394b120..0ea7629 100755 --- a/lighttpd.init +++ b/lighttpd.init @@ -18,6 +18,8 @@ upstart_controlled # Get service config [ -f /etc/sysconfig/lighttpd ] && . /etc/sysconfig/lighttpd +DAEMON=/usr/sbin/lighttpd +ANGEL_DAEMON=/usr/sbin/lighttpd-angel CONFIGFILE=/etc/lighttpd/lighttpd.conf # Check that networking is up. @@ -31,7 +33,7 @@ else fi configtest() { - env SHELL=/bin/sh lighttpd -t -f $CONFIGFILE $HTTPD_OPTS + env SHELL=/bin/sh $DAEMON -t -f $CONFIGFILE $HTTPD_OPTS } # wrapper for configtest @@ -42,7 +44,7 @@ checkconfig() { # run config test and display report (status action) show "Checking %s configuration" "Lighttpd Web Server"; busy local out - out=`configtest 2>&1` + out=$(configtest 2>&1) RETVAL=$? if [ $RETVAL = 0 ]; then ok @@ -74,10 +76,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 $CONFIGFILE $HTTPD_OPTS 1>&2 + env SHELL=/bin/sh $ANGEL_DAEMON -D -f $CONFIGFILE $HTTPD_OPTS else - env SHELL=/bin/sh lighttpd -f $CONFIGFILE $HTTPD_OPTS + env SHELL=/bin/sh $DAEMON -f $CONFIGFILE $HTTPD_OPTS fi RETVAL=$? if [ $RETVAL -eq 0 ]; then @@ -197,7 +199,7 @@ case "$1" in checkconfig 1 ;; show-config) - env SHELL=/bin/sh lighttpd -p -f $CONFIGFILE $HTTPD_OPTS + env SHELL=/bin/sh $DAEMON -p -f $CONFIGFILE $HTTPD_OPTS ;; status) if is_yes "${LIGHT_ANGEL}"; then -- 2.44.0