[Bug 286887] Re: Check lighttpd.conf on restart
Nic Ferrier
nferrier at woome.com
Wed Feb 11 09:22:50 UTC 2009
I'd like to endorse this... here's the diff from our patched version:
--- lighttpd 2009-02-11 00:50:12.000000000 -0800
+++ changed 2009-02-11 00:57:36.000000000 -0800
@@ -31,8 +31,15 @@
. /lib/lsb/init-functions
+function syntax_check
+{
+$DAEMON $DAEMON_OPTS -t
+[ $? -ne 0 ] || exit 1
+}
+
case "$1" in
start)
+ syntax_check
log_daemon_msg "Starting $DESC" $NAME
if ! $ENV $SSD --start --quiet\
--pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS ; then
@@ -52,6 +59,7 @@
fi
;;
reload)
+ syntax_check
log_daemon_msg "Reloading $DESC configuration" $NAME
if $SSD --stop --signal 2 --oknodo --retry 30\
--quiet --pidfile $PIDFILE --exec $DAEMON; then
@@ -66,6 +74,7 @@
fi
;;
restart|force-reload)
+ syntax_check
$0 stop
[ -r $PIDFILE ] && while pidof lighttpd |\
grep -q `cat $PIDFILE 2>/dev/null` 2>/dev/null ; do sleep 1; done
## ENDS
--
Check lighttpd.conf on restart
https://bugs.launchpad.net/bugs/286887
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list