diff --git a/files/all/usr/bin/wifi-sentinel.sh b/files/all/usr/bin/wifi-sentinel.sh index 2294736..1eb4a40 100755 --- a/files/all/usr/bin/wifi-sentinel.sh +++ b/files/all/usr/bin/wifi-sentinel.sh @@ -22,14 +22,6 @@ else NETWORK="$p" fi -p=$(uci get wifi-sentinel.@wifi-sentinel[0].switchport) -if [ -z "$p" ]; then - PORT=1 -else - PORT="$p" -fi - - STATUS='unknown' lightsoff() @@ -50,16 +42,6 @@ lightson() fi } -port_check() -{ - LINK=`swconfig dev switch0 port $PORT show | awk '/link/ {print $3}'` - if [ "$LINK" = 'link:up' ]; then - return 0 - else - return 1 - fi -} - ping_check() { local target @@ -75,7 +57,7 @@ ping_check() /usr/bin/logger -t wifi-sentinel -p daemon.info "Starting Wi-Fi Sentinel on the $NETWORK network with $PACKETS checks every $INTERVAL seconds." while true ; do - if port_check && ping_check; then + if ping_check; then lightson else lightsoff