Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff821a55 authored by Romain Hunault's avatar Romain Hunault 💻
Browse files

Handle no internet connection

parent 3c480d37
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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
+6 −0
Original line number Diff line number Diff line
@@ -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