From afb4bfc280abe480e98db1d3ded3b202ac76c4c0 Mon Sep 17 00:00:00 2001 From: Koray Yanik Date: Wed, 23 Feb 2022 12:44:22 +0000 Subject: [PATCH] Removed old requests that were not used anymore --- handle_requests.sh | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/handle_requests.sh b/handle_requests.sh index d67ba0b..6c0ccd4 100755 --- a/handle_requests.sh +++ b/handle_requests.sh @@ -46,38 +46,6 @@ EOF exit 0 fi -if [[ "$1" =~ ^quickping || "$1" =~ ^ping ]]; then - ip=$(echo "$1" | cut -d '/' -f2) - - attempts=1 - timeout=1 - - if [[ "$1" =~ ^ping ]]; then - attempts=30 - timeout=5 - fi - - ret=1 - for i in $(seq 1 $attempts); do - ping -c 1 -w $timeout -t 1 -q "$ip" > ping.log - ret=$? - [ $ret -eq 0 ] && break - done - - if [ $ret -eq 0 ]; then - body="{\"response\": \"ok\"}\n" - else - body="{\"response: \"fail\"}\n" - fi - -cat <