summaryrefslogtreecommitdiff
path: root/extra/lighttpd/lighttpd.rc.d
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-04-10 04:43:11 +0000
committerroot <root@rshg047.dnsready.net>2011-04-10 04:43:11 +0000
commit8f6922302486fa1cc1112ff8b3daddb48c3260f2 (patch)
treecdd13036f76c8a9b8efcc83bbaea166cc929a527 /extra/lighttpd/lighttpd.rc.d
parentf87ab435eb966ec44eb006c48699e6ee90613286 (diff)
Sun Apr 10 04:43:11 UTC 2011
Diffstat (limited to 'extra/lighttpd/lighttpd.rc.d')
-rw-r--r--extra/lighttpd/lighttpd.rc.d15
1 files changed, 6 insertions, 9 deletions
diff --git a/extra/lighttpd/lighttpd.rc.d b/extra/lighttpd/lighttpd.rc.d
index 5f851d63e..32fdd0d08 100644
--- a/extra/lighttpd/lighttpd.rc.d
+++ b/extra/lighttpd/lighttpd.rc.d
@@ -5,7 +5,7 @@
get_pid_file() {
- /usr/sbin/lighttpd -p -f /etc/lighttpd/lighttpd.conf 2>/dev/null | grep server.pid-file | cut -d= -f2
+ /usr/sbin/lighttpd -p -f /etc/lighttpd/lighttpd.conf 2>/dev/null | grep server.pid-file | sed -E 's/.*"(.+)"/\1/'
}
get_pid() {
@@ -37,20 +37,17 @@ test_config() {
stat_die
fi
- local d
- for d in /var/{run,log,cache}/lighttpd; do
- if [ ! -d $d ]; then
- stat_append "(directory $d not found)"
- stat_die
- fi
- done
-
/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf >/dev/null 2>&1
if [ $? -gt 0 ]; then
stat_append '(error in /etc/lighttpd/lighttpd.conf)'
stat_die
fi
+ local piddir=$(dirname "$(get_pid_file)")
+ if [ ! -d "{$piddir}" ]; then
+ install -d -m755 -o http -g http "${piddir}"
+ fi
+
stat_done
}