Update variable name to OVERRIDE_AP_SSID for better clarity.

This commit is contained in:
Cossid
2024-09-12 19:51:46 -05:00
parent 77dfa85fbc
commit 9fddd0a333
2 changed files with 5 additions and 5 deletions

View File

@@ -61,8 +61,8 @@ wifi_connect() {
while [ "${AP_MATCHED_NAME}" == "" ]; do
if [ ${FIRST_RUN} == true ]; then
SCAN_MESSAGE="Scanning for open Tuya SmartLife AP"
if [ "${OVERRIDE_SSID}" != "" ]; then
SCAN_MESSAGE="${SCAN_MESSAGE} ${OVERRIDE_SSID}"
if [ "${OVERRIDE_AP_SSID}" != "" ]; then
SCAN_MESSAGE="${SCAN_MESSAGE} ${OVERRIDE_AP_SSID}"
fi
echo ${SCAN_MESSAGE}
FIRST_RUN=false
@@ -75,8 +75,8 @@ wifi_connect() {
RESCAN_ARG=""
fi
if [ "${OVERRIDE_SSID}" != "" ]; then
SSID_REGEX="${OVERRIDE_SSID}"
if [ "${OVERRIDE_AP_SSID}" != "" ]; then
SSID_REGEX="${OVERRIDE_AP_SSID}"
else
# Search for an AP ending with - and 4 hexidecimal characters that has no security mode, unless we've already connected to one, in which case we look for that specific one
SSID_REGEX="-[A-F0-9]{4}"

View File

@@ -28,7 +28,7 @@ while getopts "hrntvw:p:f:d:l:s::a:k:u:o:" flag; do
a) AUTHKEY=${OPTARG};;
k) PSKKEY=${OPTARG};;
u) UUID=${OPTARG};;
o) OVERRIDE_SSID=${OPTARG};;
o) OVERRIDE_AP_SSID=${OPTARG};;
s) getopts-extra "$@"
METHOD_DETACH="true"
HAVE_SSID="true"