forked from freifunk-franken/firmware
configure all hosts for our ping test in the header ;)
This commit is contained in:
parent
7778ce70ed
commit
57db955ee5
|
@ -5,17 +5,18 @@ SERVER="no"
|
||||||
|
|
||||||
project="${VPN_PROJECT}"
|
project="${VPN_PROJECT}"
|
||||||
|
|
||||||
test_internet_host1="mastersword.de"
|
test_ipv4_host1="mastersword.de"
|
||||||
test_internet_host2="109.163.229.254"
|
test_ipv4_host2="109.163.229.254"
|
||||||
|
test_ipv6_host1="heise.de"
|
||||||
|
|
||||||
if [ "$SERVER" = "no" ]; then
|
if [ "$SERVER" = "no" ]; then
|
||||||
test -f /tmp/started || exit
|
test -f /tmp/started || exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Only do something with fastd when the router has internet connection
|
# Only do something with fastd when the router has internet connection
|
||||||
if ping -w5 -c3 "$test_internet_host1" &>/dev/null ||
|
if ping -w5 -c3 "$test_ipv4_host1" &>/dev/null ||
|
||||||
ping -w5 -c3 "$test_internet_host2" &>/dev/null ||
|
ping -w5 -c3 "$test_ipv4_host2" &>/dev/null ||
|
||||||
ping6 -w5 -c3 heise.de &>/dev/null; then
|
ping6 -w5 -c3 "$test_ipv6_host1" &>/dev/null; then
|
||||||
mac=$(awk '{ mac=toupper($1); gsub(":", "", mac); print mac }' /sys/class/net/br-mesh/address 2>/dev/null)
|
mac=$(awk '{ mac=toupper($1); gsub(":", "", mac); print mac }' /sys/class/net/br-mesh/address 2>/dev/null)
|
||||||
if [ "$SERVER" = "no" ]; then
|
if [ "$SERVER" = "no" ]; then
|
||||||
hostname=$(cat /proc/sys/kernel/hostname)
|
hostname=$(cat /proc/sys/kernel/hostname)
|
||||||
|
|
Loading…
Reference in New Issue