From: William Lallemand Date: Mon, 29 Sep 2025 17:21:08 +0000 (+0200) Subject: ADMIN: reload: introduce -vv mode X-Git-Tag: v3.3-dev9~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6316f958e3952d0791ea370954f824085eb297f0;p=thirdparty%2Fhaproxy.git ADMIN: reload: introduce -vv mode The -v verbose mode displays the loading messages returned by the master CLI reload command upon error. The new -vv mode displays the loading messages even upon success, showing the content of `show startup-logs` after the reload attempt. --- diff --git a/admin/cli/haproxy-reload b/admin/cli/haproxy-reload index f149ee5de..1040771d9 100755 --- a/admin/cli/haproxy-reload +++ b/admin/cli/haproxy-reload @@ -28,6 +28,8 @@ reload() { else if [ "$RET" = 1 ] && [ "$VERBOSE" = "2" ]; then echo "$line" >&2 + elif [ "$VERBOSE" = "3" ]; then + echo "$line" >&2 fi fi @@ -50,12 +52,13 @@ usage() { echo " EXPERIMENTAL script!" echo "" echo "Options:" - echo " -S, --master-socket Use the master socket at (default: ${MASTER_SOCKET})" - echo " -d, --debug Debug mode, set -x" - echo " -t, --timeout Timeout (socat -t) (default: ${TIMEOUT})" - echo " -s, --silent Slient mode (no output)" - echo " -v, --verbose Verbose mode (output from haproxy)" - echo " -h, --help This help" + echo " -S, --master-socket Use the master socket at (default: ${MASTER_SOCKET})" + echo " -d, --debug Debug mode, set -x" + echo " -t, --timeout Timeout (socat -t) (default: ${TIMEOUT})" + echo " -s, --silent Slient mode (no output)" + echo " -v, --verbose Verbose output (output from haproxy on failure)" + echo " -vv Even more verbose output (output from haproxy on success and failure)" + echo " -h, --help This help" echo "" echo "Examples:" echo " $0 -S ${MASTER_SOCKET} -d ${TIMEOUT}" @@ -81,6 +84,10 @@ main() { VERBOSE=2 shift ;; + -vv|--verbose) + VERBOSE=3 + shift + ;; -d|--debug) DEBUG=1 shift