Skip to content
Snippets Groups Projects
Commit 0944633e authored by MrMM's avatar MrMM
Browse files

Write info to syslog when ssid is changed, closes #2

parent 4bec54a0
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ then ...@@ -31,7 +31,7 @@ then
CURRENT_SSID=`grep "^ssid=$OFFLINE_SSID" $HOSTAPD | cut -d"=" -f2` CURRENT_SSID=`grep "^ssid=$OFFLINE_SSID" $HOSTAPD | cut -d"=" -f2`
if [ $CURRENT_SSID == $OFFLINE_SSID ] if [ $CURRENT_SSID == $OFFLINE_SSID ]
then then
echo "SSID is $CURRENT_SSID, change to $ONLINE_SSID" logger -s -t "gluon-offline-ssid" -p 5 "TQ is $GATEWAY_TQ, SSID is $CURRENT_SSID, change to $ONLINE_SSID"
sed -i s/^ssid=$CURRENT_SSID/ssid=$ONLINE_SSID/ $HOSTAPD sed -i s/^ssid=$CURRENT_SSID/ssid=$ONLINE_SSID/ $HOSTAPD
HUP_NEEDED=1 # HUP here would be to early for dualband devices HUP_NEEDED=1 # HUP here would be to early for dualband devices
else else
...@@ -52,7 +52,7 @@ else ...@@ -52,7 +52,7 @@ else
CURRENT_SSID=`grep "^ssid=$ONLINE_SSID" $HOSTAPD | cut -d"=" -f2` CURRENT_SSID=`grep "^ssid=$ONLINE_SSID" $HOSTAPD | cut -d"=" -f2`
if [ $CURRENT_SSID == $ONLINE_SSID ] if [ $CURRENT_SSID == $ONLINE_SSID ]
then then
echo "SSID is $CURRENT_SSID, change to $OFFLINE_SSID" logger -s -t "gluon-offline-ssid" -p 5 "TQ is $GATEWAY_TQ, SSID is $CURRENT_SSID, change to $OFFLINE_SSID"
sed -i s/^ssid=$ONLINE_SSID/ssid=$OFFLINE_SSID/ $HOSTAPD sed -i s/^ssid=$ONLINE_SSID/ssid=$OFFLINE_SSID/ $HOSTAPD
HUP_NEEDED=1 # HUP here would be to early for dualband devices HUP_NEEDED=1 # HUP here would be to early for dualband devices
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment