Add optin for failcommand
This commit is contained in:
parent
6ad719ded0
commit
0542bf16e7
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue