Add optin for failcommand

This commit is contained in:
Fliegerjohn 2023-08-22 18:13:16 +02:00
parent 6ad719ded0
commit 0542bf16e7

View file

@ -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
}