Browse Source

improved behaviour with default IPs and reduced status file presets

master
mxmehl 6 years ago
parent
commit
5b233c5b1a
  1. 5
      status-ip.sh

5
status-ip.sh

@ -16,6 +16,7 @@ if [ "$var_conn" == "on" ]; then @@ -16,6 +16,7 @@ if [ "$var_conn" == "on" ]; then
elif ([ "$EXIT" == 4 ] || [ "$EXIT" == 6 ] || [ "$EXIT" == 28 ]); then
EXIT="fail"
TEXT="t/o"
var_ip4="0.0.0.0"
else
TEXT="$IP"
var_ip4="$IP"
@ -30,6 +31,7 @@ if [ "$var_conn" == "on" ]; then @@ -30,6 +31,7 @@ if [ "$var_conn" == "on" ]; then
EXIT="$?"
if ([ "$EXIT" == 4 ] || [ "$EXIT" == 6 ] || [ "$EXIT" == 28 ]); then
TEXT="t/o"
var_ip6="::0"
else
TEXT="$IP6"
var_ip6="$IP6"
@ -39,6 +41,9 @@ if [ "$var_conn" == "on" ]; then @@ -39,6 +41,9 @@ if [ "$var_conn" == "on" ]; then
else
echo "<txt>offline</txt>"
echo "<tool>Offline status is set. Turn on to enable checks</tool>"
var_vpn=off
var_ip4=0.0.0.0
var_ip6=::0
fi
wtmp var_ip4 var_ip6 var_vpn # Write changes back

Loading…
Cancel
Save