Commit b39019c8 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Tolerate vcl.show error 201 (response truncated)

Fixes #104
parent 628ea67c
......@@ -112,15 +112,23 @@ find_label_ref() {
}
find_vcl_file() {
VCL_SHOW=$(varnishadm vcl.show -v "$VCL_NAME") ||
fail "failed to get the VCL file name"
echo "$VCL_SHOW" |
awk '$1 == "//" && $2 == "VCL.SHOW" {print; exit}' | {
# all this ceremony to handle blanks in FILE
read -r DELIM VCL_SHOW INDEX SIZE FILE
echo "$FILE"
}
VCL_SHOW=$(varnishadm vcl.show -v "$VCL_NAME" 2>&1) || :
VCL_FILE=$(
echo "$VCL_SHOW" |
awk '$1 == "//" && $2 == "VCL.SHOW" {print; exit}' | {
# all this ceremony to handle blanks in FILE
read -r DELIM VCL_SHOW INDEX SIZE FILE
echo "$FILE"
}
) || :
if [ -z "$VCL_FILE" ]
then
echo "$VCL_SHOW" >&2
fail "failed to get the VCL file name"
fi
echo "$VCL_FILE"
}
find_vcl_reloads() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment