diff options
Diffstat (limited to 'Biz/Bild/ShellHook.sh')
-rw-r--r-- | Biz/Bild/ShellHook.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Biz/Bild/ShellHook.sh b/Biz/Bild/ShellHook.sh index a41d050..b42ab1d 100644 --- a/Biz/Bild/ShellHook.sh +++ b/Biz/Bild/ShellHook.sh @@ -87,17 +87,28 @@ function run-sentry() { https://simatime.com https://tv.simatime.com https://bsima.me + https://herocomics.app ) + RED='\033[0;31m' + GRN='\033[0;32m' + YEL='\033[0;33m' + NC='\033[0m' # No Color for url in ${urls[@]} do code=$(curl -L --max-time 10 --silent --show-error --insecure \ --output /dev/null \ --write-out "%{http_code}" "$url") - echo "$code $url" + case "$code" in + 2[0-9][0-9]) printf "${GRN}$code $url${NC}\n";; + 3[0-9][0-9]) printf "${YEL}$code $url${NC}\n";; + 4[0-9][0-9]) printf "${YEL}$code $url${NC}\n";; + 5[0-9][0-9]) printf "${RED}$code $url${NC}\n";; + *) printf "${RED}$code $url${NC}\n";; + esac done } export -f run-sentry -alias sentry="watch --exec bash -c run-sentry" +alias sentry="watch --color --exec bash -c run-sentry" # Poor man's ci function run-ci() { |