From 7c7dbad262c1304e6c8871ca19f142e6d4d5b39c Mon Sep 17 00:00:00 2001 From: Nils Date: Mon, 20 Sep 2021 18:41:58 +0200 Subject: [PATCH] add support for multiple servers/reverse proxy setups --- status.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/status.sh b/status.sh index 75681c1..9dd7b05 100755 --- a/status.sh +++ b/status.sh @@ -25,7 +25,7 @@ function get_code { elif [[ "$http_code" < 599 && "$http_code" > 499 ]];then http_code="[\e[31m"$http_code"\e[0m" fi - http_server=" | \e[1;34m$(echo "$http_raw" | grep -i "server" | sort -u | cut -d " " -f 2)\e[0m]" + http_server=" | \e[1;34m$(echo "$http_raw" | grep -i "server" | sort -u | cut -d " " -f 2 | tr -s '\n' ' '| xargs | sed 's/ / + /g')\e[0m]" http_results=""$http_results" $(printf "%-63s%s\n" ["\e[1;35m"$h"\e[0m"] "$http_code""$http_server")" }