mirror of
https://github.com/femtofox/femtofox.git
synced 2026-11-20 15:06:36 -05:00
wifi mesh control checks for wlan0 existence
If wlan0 does not exist, do nothing,
This commit is contained in:
parent
7e133b54d1
commit
0528e075eb
1 changed files with 2 additions and 2 deletions
|
|
@ -67,8 +67,8 @@ monitor_changes() {
|
|||
|
||||
while true; do
|
||||
PID=$(ps -C meshtasticd -o pid= | tr -d ' ')
|
||||
if [[ -n "$PID" ]] && sudo lsof /dev/spidev0.0 | grep -q "$PID"; then
|
||||
#if sudo lsof /dev/spidev0.0 | grep -q "meshtasticd"; then
|
||||
#if [[ -n "$PID" ]] && sudo lsof /dev/spidev0.0 | grep -q "$PID"; then
|
||||
if [[ -n "$PID" ]] && sudo lsof /dev/spidev0.0 | grep -q "$PID" && [[ -d /sys/class/net/wlan0 ]]; then
|
||||
local current_mobile_state current_wlan_state
|
||||
current_mobile_state=$(get_mobile_wifi_state)
|
||||
current_wlan_state=$(cat /sys/class/net/wlan0/operstate)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue