Merge pull request #380 from femtofox/noon2

Fix wifi toggle on button press
This commit is contained in:
noon92 2025-03-04 12:46:42 +02:00 • committed by GitHub
commit 89d10194bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,10 +55,10 @@ while getopts ":hx:Ts:p:c:eiwn:tr" opt; do
T) # Option -T (toggle wifi state)
if [ "$(cat /etc/wifi_state.txt)" == "up" ]; then
logger "Toggling wifi off"
femto-network-config.sh -x "up"
femto-network-config.sh -x "down"
else
logger "Toggling wifi on"
femto-network-config.sh -x "down"
femto-network-config.sh -x "up"
fi
;;
s) # Option -s (ssid)