From 286c4cab059453c5673ef0a7b54a6abf92669875 Mon Sep 17 00:00:00 2001 From: Tidoni Date: Mon, 20 Nov 2023 22:32:13 +0100 Subject: [PATCH] update --- highloadFunctions.fn | 4 +--- mixdropFunctions.fn | 4 ++-- streamhideFunctions.fn | 2 +- streamtapeFunctions.fn | 4 +--- upstreamFunctions.fn | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/highloadFunctions.fn b/highloadFunctions.fn index 810cd70..60a97a6 100644 --- a/highloadFunctions.fn +++ b/highloadFunctions.fn @@ -66,10 +66,8 @@ function highload_check_if_file_is_alive () { # >&2 echo $is_alive - if [ "$is_alive" == "404" ]; then + if [ "$is_alive" -eq "404" ]; then echo "false" -# elif [ $is_alive = '500' ]; then -# echo "false" else echo "true" fi diff --git a/mixdropFunctions.fn b/mixdropFunctions.fn index 2379f7c..3488712 100644 --- a/mixdropFunctions.fn +++ b/mixdropFunctions.fn @@ -42,10 +42,10 @@ function mixdrop_check_if_file_is_alive () { file_id=${file_id##*/} >&2 echo "File ID: $file_id" - >&2 echo "URL to call: https://api.mixdrop.co/fileinfo?email=$api_login&key=$api_key&ref[]=$file_id" + # >&2 echo "URL to call: https://api.mixdrop.co/fileinfo?email=$api_login&key=$api_key&ref[]=$file_id" response=$(curl -s -X GET "https://api.mixdrop.co/fileinfo?email=$api_login&key=$api_key&ref[]=$file_id" -H "Content-Type: multipart/form-data") - >&2 echo "Response: $response" + # >&2 echo "Response: $response" is_alive=$(echo $response | jq ".success") # is_alive=$(echo $is_alive | jq ".[0]") diff --git a/streamhideFunctions.fn b/streamhideFunctions.fn index 7e08b03..a91a0b3 100755 --- a/streamhideFunctions.fn +++ b/streamhideFunctions.fn @@ -49,7 +49,7 @@ function streamhide_check_if_file_is_alive () { if [ "$is_alive" == "\"Not found\"" ]; then echo "false" - elif [ $is_alive = '200' ]; then + elif [ $is_alive == "200" ]; then echo "true" else echo "false" diff --git a/streamtapeFunctions.fn b/streamtapeFunctions.fn index 59c2bdd..ab9ed92 100755 --- a/streamtapeFunctions.fn +++ b/streamtapeFunctions.fn @@ -50,10 +50,8 @@ function streamtape_check_if_file_is_alive () { # echo $is_alive - if [ $is_alive == '404' ]; then + if [ $is_alive -eq '404' ]; then echo "false" -# elif [ $is_alive = '500' ]; then -# echo "false" else echo "true" fi diff --git a/upstreamFunctions.fn b/upstreamFunctions.fn index 1a2a695..609b800 100755 --- a/upstreamFunctions.fn +++ b/upstreamFunctions.fn @@ -49,7 +49,7 @@ function upstream_check_if_file_is_alive () { if [ "$is_alive" == "\"Not found\"" ]; then echo "false" - elif [ $is_alive = '200' ]; then + elif [ $is_alive == "200" ]; then echo "true" else echo "false"