diff --git a/get-e.sh b/get-e.sh index 15d4964989f77bd90b5f9f743be9278506cb35f3..ee71e962a99254f2139e4fa3026ecb037ea70374 100755 --- a/get-e.sh +++ b/get-e.sh @@ -29,12 +29,18 @@ # - 6 : Username/password authentication failure (see wget exit status here: https://www.gnu.org/software/wget/manual/html_node/Exit-Status.html) # - 7 : Protocol errors (see wget exit status here: https://www.gnu.org/software/wget/manual/html_node/Exit-Status.html) # - 8 : Server issued an error response (see wget exit status here: https://www.gnu.org/software/wget/manual/html_node/Exit-Status.html) +# - 10: No internet connection # - 101 : E_ARCHIVE_URL missing # - 102 : E_FOLDER missing E_ARCHIVE_URL=$1 E_FOLDER=$2 +if ! ping -c 1 spot.ecloud.global 2>&1 >/dev/null +then + exit 10 +fi + if [ -z ${E_FOLDER} ] then exit 101 diff --git a/get-twrp.sh b/get-twrp.sh index 0b9b6aa2cdc7937164f4d87e4d60a33682f3c752..cccfd963b1787ceb3766941d4155a978818c5577 100755 --- a/get-twrp.sh +++ b/get-twrp.sh @@ -29,12 +29,18 @@ # - 6 : Username/password authentication failure (see wget exit status here: https://www.gnu.org/software/wget/manual/html_node/Exit-Status.html) # - 7 : Protocol errors (see wget exit status here: https://www.gnu.org/software/wget/manual/html_node/Exit-Status.html) # - 8 : Server issued an error response (see wget exit status here: https://www.gnu.org/software/wget/manual/html_node/Exit-Status.html) +# - 10: No internet connection # - 101 : TWRP_IMG_URL missing # - 102 : TWRP_FOLDER missing TWRP_IMG_URL=$1 TWRP_FOLDER=$2 +if ! ping -c 1 spot.ecloud.global 2>&1 >/dev/null +then + exit 10 +fi + if [ -z ${TWRP_IMG_URL} ] then exit 101