Skip to content

Commit

Permalink
add --force-hotspot option for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Nov 3, 2023
1 parent 236da57 commit c12cb0f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#Other setup required find out more at
#http://www.raspberryconnect.com

if [ $# -eq 1 ] && [ "$1" == "--force-hotspot" ]; then
FORCE_HOTSPOT=1
fi

NO_SSID='NoSSid'
ssidChk="$NO_SSID"

Expand Down Expand Up @@ -98,6 +102,8 @@ CheckDevice()

FindSSID()
{
if [ -n "$FORCE_HOTSPOT" ]; then return; fi

#Check to see what SSID's and MAC addresses are in range
local i=0; j=0
while [ $i -eq 0 ]
Expand Down Expand Up @@ -173,7 +179,8 @@ CheckSSID()
}

CheckDevice
if (rfkill list wifi -rno HARD,SOFT | grep -i "unblocked.*unblocked") >/dev/null 2>&1 ; then
if (rfkill list wifi -rno HARD,SOFT | grep -i "unblocked.*unblocked") >/dev/null 2>&1
then
FindSSID
CheckSSID
else
Expand Down

0 comments on commit c12cb0f

Please sign in to comment.