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 <