Skip to content

Commit a331863

Browse files
committed
bash dashing
1 parent 656652e commit a331863

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/hotspot.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ do
110110
systemctl stop omnipy-beacon.service
111111
systemctl stop omnipy.service
112112
echo "Known networks are nearby, deactivating hotspot and connecting to wi-fi"
113-
if ! CreateWifiClient; then
113+
CreateWifiClient
114+
if ! IsWifiConnected; then
114115
echo "Failed to connect to wifi, going back into hotspot mode"
115116
CreateHotSpot
116117
ACTIVE_MODE="ap"
@@ -126,7 +127,8 @@ do
126127
sleep 60
127128
if ! IsWifiConnected; then
128129
echo "Wi-fi disconnected, retrying"
129-
if ! CreateWifiClient; then
130+
CreateWifiClient
131+
if ! IsWifiConnected; then
130132
echo "No wi-fi connection, creating hot-spot"
131133
CreateHotSpot
132134
ACTIVE_MODE="ap"
@@ -141,7 +143,8 @@ do
141143
elif [[ ${ACTIVE_MODE} == "client-only" ]]; then
142144
if ! IsWifiConnected; then
143145
echo "Wi-fi disconnected, retrying"
144-
if ! CreateWifiClient; then
146+
CreateWifiClient
147+
if ! IsWifiConnected; then
145148
echo "Wi-fi connection failed, waiting to retry"
146149
sleep 120
147150
fi

0 commit comments

Comments
 (0)