Last active
          October 5, 2021 07:04 
        
      - 
      
- 
        Save manhdaovan/41a8fcb0fb1eab5930725df18185d16f to your computer and use it in GitHub Desktop. 
Revisions
- 
        manhdaovan revised this gist Oct 5, 2021 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,17 +4,17 @@ # using cURL with HTTP GET method. url=$1 TXT_RED='\033[0;31m' TXT_GREEN='\033[0;32m' # check until pressing Ctr+C echo "[$(date +%s)] Start checking probation for url: $url" while true; do if ! curl --max-time 1 --output /dev/null --silent --fail $url &> /dev/null then printf "${TXT_RED}[$(date +%s)] F\n" else printf "${TXT_GREEN}[$(date +%s)] .\n" fi sleep 1 
- 
        manhdaovan revised this gist Oct 5, 2021 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,11 +19,12 @@ while true; do sleep 1 done # check until response success # echo "[$(date +%s)] Start checking probation for url: $url" # until $(curl --max-time 1 --output /dev/null --silent --fail $url); do # printf '.' # sleep 1 # done # echo "" # echo "[$(date +%s)] Finish checking probation for url: $url" 
- 
        manhdaovan revised this gist Oct 5, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,6 +21,7 @@ while true; do done echo "[$(date +%s)] Finish checking probation for url: $url" # check until response success # until $(curl --max-time 1 --output /dev/null --silent --fail $url); do # printf '.' # done 
- 
        manhdaovan created this gist Oct 5, 2021 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ #!/bin/bash # Simple tool to check probation of given URL # using cURL with HTTP GET method. url=$1 RED='\033[0;31m' GREEN='\033[0;32m' # check until pressing Ctr+C echo "[$(date +%s)] Start checking probation for url: $url" while true; do if ! curl --max-time 1 --output /dev/null --silent --fail $url &> /dev/null then printf "${RED}[$(date +%s)] F\n" else printf "${GREEN}[$(date +%s)] .\n" fi sleep 1 done echo "[$(date +%s)] Finish checking probation for url: $url" # until $(curl --max-time 1 --output /dev/null --silent --fail $url); do # printf '.' # done # echo "" # echo "[$(date +%s)] Finish checking probation for url: $url"