Significantly improved handling of failed connection to server
This commit is contained in:
parent
3d8210aff8
commit
087a000c91
4
init.sh
4
init.sh
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
echo "STARTING" > /status
|
echo "STARTING" > /status
|
||||||
echo " === Checking internet connectivity..."
|
echo " === Checking internet connectivity..."
|
||||||
curl -s get.5e.tools > /dev/null
|
SITE_STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://get.5e.tools)
|
||||||
|
|
||||||
if [ $? = 0 ] # if the get.5e.tools site is accessible
|
if [ $SITE_STATUS = 200 ] # if the get.5e.tools site is accessible
|
||||||
then
|
then
|
||||||
echo "CHECKING FOR UPDATE" > /status
|
echo "CHECKING FOR UPDATE" > /status
|
||||||
FN=`curl -s -k -I https://get.5e.tools/src/|grep filename|cut -d"=" -f2 | awk '{print $1}'` # get filename of most recent version
|
FN=`curl -s -k -I https://get.5e.tools/src/|grep filename|cut -d"=" -f2 | awk '{print $1}'` # get filename of most recent version
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user