From: Glenn Strauss Date: Sun, 27 Nov 2022 20:39:24 +0000 (-0500) Subject: lighttpd: print stderr trace if validation fails X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=38ffa02e422bac544eee9578830a8b6a49265be1;p=feed%2Fpackages.git lighttpd: print stderr trace if validation fails lighttpd.init validate_conf(): print stderr trace if validation fails Signed-off-by: Glenn Strauss --- diff --git a/net/lighttpd/files/lighttpd.init b/net/lighttpd/files/lighttpd.init index 1d290063ef..04de178451 100644 --- a/net/lighttpd/files/lighttpd.init +++ b/net/lighttpd/files/lighttpd.init @@ -8,8 +8,8 @@ USE_PROCD=1 PROG=/usr/sbin/lighttpd validate_conf() { - $PROG -tt -f /etc/lighttpd/lighttpd.conf >/dev/null 2>&1 || { - echo "validation failed" + $PROG -tt -f /etc/lighttpd/lighttpd.conf >/dev/null || { + echo 1>&2 "lighttpd.conf validation failed" return 1 } } @@ -34,6 +34,7 @@ service_triggers() { } reload_service() { + validate_conf || exit 1 # lighttpd graceful restart (SIGUSR1) procd_send_signal lighttpd '*' USR1 }