From 3db5bead98d90abd4551028081218ef2e24f1b38 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sun, 27 Nov 2022 15:39:24 -0500 Subject: [PATCH] lighttpd: print stderr trace if validation fails lighttpd.init validate_conf(): print stderr trace if validation fails Signed-off-by: Glenn Strauss (cherry picked from commit 38ffa02e422bac544eee9578830a8b6a49265be1) --- net/lighttpd/files/lighttpd.init | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 } -- 2.30.2