From 0992c62755851a0dc3e994062afb65bb8c7543df Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Thu, 22 Dec 2022 21:35:01 -0800 Subject: [PATCH] Terminate monitors when nothing to monitor (#577) --- files/usr/local/bin/mgr/rssi_monitor_ath10k.lua | 2 +- files/usr/local/bin/mgr/rssi_monitor_ath9k.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/usr/local/bin/mgr/rssi_monitor_ath10k.lua b/files/usr/local/bin/mgr/rssi_monitor_ath10k.lua index cf701149..eb9804fe 100644 --- a/files/usr/local/bin/mgr/rssi_monitor_ath10k.lua +++ b/files/usr/local/bin/mgr/rssi_monitor_ath10k.lua @@ -45,7 +45,7 @@ function rssi_monitor_10k() -- ath10k only local phy = iwinfo.nl80211.phyname(wifiiface) - if not nixio.fs.stat("/sys/kernel/debug/ieee80211/" .. phy .. "/ath10k") then + if not phy or not nixio.fs.stat("/sys/kernel/debug/ieee80211/" .. phy .. "/ath10k") then exit_app() return end diff --git a/files/usr/local/bin/mgr/rssi_monitor_ath9k.lua b/files/usr/local/bin/mgr/rssi_monitor_ath9k.lua index ae505008..4e8e75f1 100644 --- a/files/usr/local/bin/mgr/rssi_monitor_ath9k.lua +++ b/files/usr/local/bin/mgr/rssi_monitor_ath9k.lua @@ -48,7 +48,7 @@ function rssi_monitor_9k() phy = iwinfo.nl80211.phyname(wifiiface) -- Supports ath9k - if not nixio.fs.stat("/sys/kernel/debug/ieee80211/" .. phy .. "/ath9k") then + if not phy or not nixio.fs.stat("/sys/kernel/debug/ieee80211/" .. phy .. "/ath9k") then exit_app() return end