From 28d3af8ca12b375e71fe7c930c520ee324c12e9d Mon Sep 17 00:00:00 2001 From: gutosie Date: Wed, 15 Apr 2020 20:23:29 +0200 Subject: [PATCH] 8.24fix --- NeoBoot/files/userscript.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/NeoBoot/files/userscript.sh b/NeoBoot/files/userscript.sh index a511709..b971686 100644 --- a/NeoBoot/files/userscript.sh +++ b/NeoBoot/files/userscript.sh @@ -1,5 +1,7 @@ #!/bin/sh -e -# script gutosie - here you can add your own command to perform +# script gutosie +# here you can add your own command to perform +# line - Checking internet connection by @j00zek thank you :) if [ ! -e /usr/bin/ipkg ]; then ln -sfn /usr/bin/opkg /usr/bin/ipkg @@ -16,7 +18,16 @@ if [ ! -e /usr/bin/enigma2_pre_start.sh ] ; then /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh fi +echo "_(Checking internet connection)..." +ping -c 1 github.com 1>/dev/null 2>%1 +if [ $? -gt 0 ]; then + echo -n "_(github server unavailable, update impossible)!!! network restart... " + /etc/init.d/networking stop; sleep 1; /etc/init.d/networking start; +else + echo "_(github server available)!!!" +fi + echo "file used userscript " echo ok - + exit 0 \ No newline at end of file