diff --git a/checkconnection.sh b/checkconnection.sh index 5028486..5eb4a36 100755 --- a/checkconnection.sh +++ b/checkconnection.sh @@ -5,8 +5,8 @@ # # Testsites should return HTTP-Code "204" -testsite1=https://datenkastl.de/.connectivity-check -testsite2=http://captiveportal.kuketz.de +testsite1="https://datenkastl.de/.connectivity-check" +testsite2="http://captiveportal.kuketz.de" # Testdomains for ping testdomain1=datenkastl.de @@ -16,6 +16,9 @@ testdomain2=metager.de curlbin=`type -tp curl` pingbin=`type -tp ping` +# Command in case of connection fail. +failcommand="echo Exit without action" + # ## Functions # @@ -36,6 +39,8 @@ testwithcurl() { else echo "The network is down." + $failcommand + fi fi } @@ -51,6 +56,7 @@ testwithping() { else echo "The network is down." + $failcommand fi }