From 21acec8e691ae6196f4d8002b33d043ee2c6b4e0 Mon Sep 17 00:00:00 2001 From: Alvin Schiller <103769832+AlvinSchiller@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:03:29 +0100 Subject: [PATCH] add --force-hotspot option for easier testing --- .../autohotspot.sh.stretch-default2-Hotspot.sample | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/misc/sampleconfigs/autohotspot.sh.stretch-default2-Hotspot.sample b/misc/sampleconfigs/autohotspot.sh.stretch-default2-Hotspot.sample index c8dd1db2e..4d1918805 100644 --- a/misc/sampleconfigs/autohotspot.sh.stretch-default2-Hotspot.sample +++ b/misc/sampleconfigs/autohotspot.sh.stretch-default2-Hotspot.sample @@ -9,6 +9,14 @@ #Other setup required find out more at #http://www.raspberryconnect.com +if [ $# -gt 0 ] ; then + if [ $# -eq 1 ] && [ "$1" == "--force-hotspot" ]; then + FORCE_HOTSPOT=1 + else + echo "ignoring unrecognized parameter: $*" + fi +fi + NO_SSID='NoSSid' ssidChk="$NO_SSID" @@ -108,6 +116,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 ]