From 82a736c0f1b6b3480ae9fc9f5aacb9c3f87fc40d Mon Sep 17 00:00:00 2001
From: Pavel Kirilin <win10@list.ru>
Date: Fri, 10 Apr 2020 15:27:01 +0400
Subject: [PATCH] Fixed listing assuming that DOWN status is 502 on CLoudFlare.

Signed-off-by: Pavel Kirilin <win10@list.ru>
---
 listing.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/listing.sh b/listing.sh
index 02bd67d..8829d44 100755
--- a/listing.sh
+++ b/listing.sh
@@ -31,7 +31,7 @@ for filename in $(ls "$sites_dir" | sort -d); do
   STATUS_CODE="$(curl -o /dev/null -s -w "%{http_code}\n" "$URL")"
   if [ "$STATUS_CODE" = "000" ];then
     STATUS="${YELLOW}[CLOSED]"
-    else if [ "$STATUS_CODE"  -ge 400 ];then
+    else if [ "$STATUS_CODE" = "502" ];then
     STATUS="${RED}[ DOWN ]"  
     fi
   fi
-- 
GitLab