[4.1] 2a89fb9 Output configuration errors to stdout.
Lasse Karstensen
lkarsten at varnish-software.com
Mon Sep 7 21:57:50 CEST 2015
commit 2a89fb932c600deeabedc2968f10392dd4de735e
Author: Lasse Karstensen <lkarsten at varnish-software.com>
Date: Mon Sep 7 21:57:18 2015 +0200
Output configuration errors to stdout.
If Varnish doesn't like the config, let us do the
admin the service of actually telling her what is wrong.
diff --git a/varnish.init b/varnish.init
index b86a4f8..8ea10c9 100644
--- a/varnish.init
+++ b/varnish.init
@@ -101,11 +101,14 @@ status_varnishd() {
}
configtest() {
- $DAEMON ${DAEMON_OPTS} -C -n /tmp > /dev/null
+ $DAEMON ${DAEMON_OPTS} -C -n /tmp 2>/dev/null
+ if [ "$?" != 0 ]; then
+ $DAEMON ${DAEMON_OPTS} -C -n /tmp
+ return $?
+ fi
}
-
case "$1" in
start)
case "${START:-}" in
More information about the varnish-commit
mailing list