Skip to content

Commit

Permalink
ffac-ssid-changer: ignore config if private-wlan is enabled (which us…
Browse files Browse the repository at this point in the history
…es br-wan instead)

closes #82
  • Loading branch information
maurerle committed Jun 10, 2024
1 parent 01d54ad commit 0f0dd0a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ffac-ssid-changer/shsrc/ssid-changer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ if [ "$CHECK" -gt 0 ] || [ "$DISABLED" = '1' ]; then
log_debug "node is online"
LOOP=1
# check status for all physical devices
for HOSTAPD in /var/run/hostapd-*; do
for HOSTAPD in /var/run/hostapd-*.conf; do
[ -e "$HOSTAPD" ] || break # handle the case of no hostapd-* files
grep "^bridge=br-client" "$HOSTAPD" || break # handle case of private wifi
# shellcheck disable=SC2086 # ONLINE_SSIDs has multiple lines
ONLINE_SSID="$(echo $ONLINE_SSIDs | awk -F '~' -v l=$((LOOP*2)) '{print $l}')"
LOOP=$((LOOP+1))
Expand Down Expand Up @@ -178,8 +179,9 @@ elif [ "$CHECK" -eq 0 ]; then
if [ "$OFF_COUNT" -ge $((T / 2)) ]; then
# node was offline more times than half of switch_timeframe (or than $FIRST)
LOOP=1
for HOSTAPD in /var/run/hostapd-*; do
for HOSTAPD in /var/run/hostapd-*.conf; do
[ -e "$HOSTAPD" ] || break # handle the case of no hostapd-* files
grep "^bridge=br-client" "$HOSTAPD" || break # handle case of private wifi
# shellcheck disable=SC2086 # ONLINE_SSIDs has multiple lines
ONLINE_SSID="$(echo $ONLINE_SSIDs | awk -F '~' -v l=$((LOOP*2)) '{print $l}')"
LOOP=$((LOOP+1))
Expand Down

0 comments on commit 0f0dd0a

Please sign in to comment.