[packages/lighttpd] variable for daemon processes
glen
glen at pld-linux.org
Fri Sep 28 16:54:02 CEST 2012
commit 8f80a943c3fec3b45b2baddd3e01196e93e3b957
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Sep 28 17:29:02 2012 +0300
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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lighttpd.git/commitdiff/0ba2e99cdddea434151bdf7c34f673acf6b30665
More information about the pld-cvs-commit
mailing list