lighttpd: print stderr trace if validation fails

lighttpd.init validate_conf(): print stderr trace if validation fails

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
Glenn Strauss 2022-11-27 15:39:24 -05:00 committed by Rosen Penev
parent 9ac99b72bb
commit 38ffa02e42

View file

@ -8,8 +8,8 @@ USE_PROCD=1
PROG=/usr/sbin/lighttpd PROG=/usr/sbin/lighttpd
validate_conf() { validate_conf() {
$PROG -tt -f /etc/lighttpd/lighttpd.conf >/dev/null 2>&1 || { $PROG -tt -f /etc/lighttpd/lighttpd.conf >/dev/null || {
echo "validation failed" echo 1>&2 "lighttpd.conf validation failed"
return 1 return 1
} }
} }
@ -34,6 +34,7 @@ service_triggers() {
} }
reload_service() { reload_service() {
validate_conf || exit 1
# lighttpd graceful restart (SIGUSR1) # lighttpd graceful restart (SIGUSR1)
procd_send_signal lighttpd '*' USR1 procd_send_signal lighttpd '*' USR1
} }