Removed old requests that were not used anymore

This commit is contained in:
Koray Yanik 2022-02-23 12:44:22 +00:00
parent 0a65725361
commit afb4bfc280
1 changed files with 0 additions and 32 deletions

View File

@ -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 <<EOF
$($BASHSERV_DIR/header.sh -t "application/json" -l $(echo -ne "$body" | wc -c))
$(echo -ne $body)
EOF
exit 0
fi
if [[ "$1" =~ ^wol ]]; then
mac=$(echo "$1" | cut -d '/' -f2)