Skip to content
Snippets Groups Projects
Commit c50f2e60 authored by fuzzle's avatar fuzzle
Browse files

fix typos - which leads in faulty check

parent 479798fa
No related branches found
No related tags found
No related merge requests found
...@@ -3,17 +3,19 @@ ...@@ -3,17 +3,19 @@
# maximum simplyfied, no more ttvn rating # maximum simplyfied, no more ttvn rating
check=$(batctl gwl -H|wc -l) check=$(batctl gwl -H|wc -l)
name=$(nodename status|tail -c 21) name=$(nodename status|tail -c 21)
OFFLINE_PREFIX="FF_OFFLINE_" offline="FF_OFFLINE_"
default="freiburg.freifunk.net" default="freiburg.freifunk.net"
offi="$offline$name" offi=$offline$name
if [ $check -eq 0 ] ; then if [ $check -eq 0 ] ; then
if [ $(uci get wireless.client_radio0.ssid) -eq "$offi" ] ; then exit 0 ; fi if [ "$(uci get wireless.client_radio0.ssid)" == "$offi" ] ; then echo "$0 - still on $offi"|logger ; exit 0 ; fi
uci set wireless.client_radio0.ssid='$OFFLINE_PREFIX$name' echo "$0 change ssid to $offi" | logger
killall -HUP hostapd uci set wireless.client_radio0.ssid="$offi"
killall -HUP hostapd
fi fi
if [ $check -gt 0 ] ; then if [ $check -gt 0 ] ; then
if [ $(uci get wireless.client_radio0.ssid) -eq "$default" ] ; then exit 0 ; fi if [ "$(uci get wireless.client_radio0.ssid)" == "$default" ] ; then echo "$0 - still on $default"|logger ; exit 0 ; fi
wireless.client_radio0.ssid='freiburg.freifunk.net' echo "$0 change ssid to $default"| logger
uci set wireless.client_radio0.ssid=freiburg.freifunk.net
killall -HUP hostapd killall -HUP hostapd
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment