Community maintained packages for ImmortalWrt.
Revision | 3db5bead98d90abd4551028081218ef2e24f1b38 (tree) |
---|---|
Time | 2022-12-02 17:59:57 |
Author | Glenn Strauss <gstrauss@glue...> |
Commiter | Josef Schlehofer |
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>
(cherry picked from commit 38ffa02e422bac544eee9578830a8b6a49265be1)
@@ -8,8 +8,8 @@ USE_PROCD=1 | ||
8 | 8 | PROG=/usr/sbin/lighttpd |
9 | 9 | |
10 | 10 | validate_conf() { |
11 | - $PROG -tt -f /etc/lighttpd/lighttpd.conf >/dev/null 2>&1 || { | |
12 | - echo "validation failed" | |
11 | + $PROG -tt -f /etc/lighttpd/lighttpd.conf >/dev/null || { | |
12 | + echo 1>&2 "lighttpd.conf validation failed" | |
13 | 13 | return 1 |
14 | 14 | } |
15 | 15 | } |
@@ -34,6 +34,7 @@ service_triggers() { | ||
34 | 34 | } |
35 | 35 | |
36 | 36 | reload_service() { |
37 | + validate_conf || exit 1 | |
37 | 38 | # lighttpd graceful restart (SIGUSR1) |
38 | 39 | procd_send_signal lighttpd '*' USR1 |
39 | 40 | } |