mirror of
https://github.com/femtofox/femtofox.git
synced 2026-11-30 20:07:01 -05:00
Fix button.sh logging
This commit is contained in:
parent
5ef1d4fbef
commit
632fb5062a
1 changed files with 3 additions and 3 deletions
|
|
@ -20,14 +20,14 @@ evtest --grab /dev/input/event0 | while read line; do
|
|||
) &
|
||||
wifi_status=$(cat /root/.portduino/default/prefs/config.proto | protoc --decode_raw | awk '/4 {/, /}/ {if ($1 == "1:") print $2}')
|
||||
if [ "$wifi_status" -eq 1 ]; then
|
||||
echo "$duration second button press detected. Toggling wifi off."
|
||||
logger "$duration second button press detected. Toggling wifi off."
|
||||
/usr/local/bin/updatemeshtastic.sh "--set network.wifi_enabled false" 10 "Button toggle wifi"
|
||||
else
|
||||
echo "$duration second button press detected. Toggling wifi on."
|
||||
logger "$duration second button press detected. Toggling wifi on."
|
||||
/usr/local/bin/updatemeshtastic.sh "--set network.wifi_enabled true" 10 "Button toggle wifi"
|
||||
fi
|
||||
else
|
||||
echo "$duration second button press detected. Rebooting."
|
||||
logger "$duration second button press detected. Rebooting."
|
||||
echo 1 > /sys/class/gpio/gpio34/value;
|
||||
sudo reboot
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue