aboutsummaryrefslogtreecommitdiffstats
path: root/daily-psk.capsman
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-01-22 12:16:06 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-01-22 12:16:06 +0100
commitc7498c6397b706d191741d0a6634d4adfbd4c0db (patch)
treee1420218333583a4fcd036138dc23270c57ffa70 /daily-psk.capsman
parente6c256cd4b74599f3f539ca2c48adab91bd5ee8e (diff)
daily-psk: fixes for CAPsMAN
Diffstat (limited to 'daily-psk.capsman')
-rw-r--r--daily-psk.capsman7
1 files changed, 4 insertions, 3 deletions
diff --git a/daily-psk.capsman b/daily-psk.capsman
index 46e4e1d..81cb5a2 100644
--- a/daily-psk.capsman
+++ b/daily-psk.capsman
@@ -60,8 +60,9 @@ $WaitFullyConnected;
:local NewPsk [ $GeneratePSK $Date ];
:foreach AccList in=[ /caps-man/access-list/find where comment~$DailyPskMatchComment ] do={
- :local Ssid [ /caps-man/access-list/get $AccList ssid-regexp ];
- :local Configuration [ /caps-man/configuration/get ([ find where ssid=$Ssid ]->0) name ];
+ :local SsidRegExp [ /caps-man/access-list/get $AccList ssid-regexp ];
+ :local Configuration ([ /caps-man/configuration/find where ssid~$SsidRegExp ]->0);
+ :local Ssid [ /caps-man/configuration/get $Configuration ssid ];
:local OldPsk [ /caps-man/access-list/get $AccList private-passphrase ];
:local Skip 0;
@@ -69,7 +70,7 @@ $WaitFullyConnected;
$LogPrintExit2 info $0 ("Updating daily PSK for " . $Ssid . " to " . $NewPsk . " (was " . $OldPsk . ")") false;
/caps-man/access-list/set $AccList private-passphrase=$NewPsk;
- :if ([ :len [ /caps-man/interface/find where configuration=$Configuration ] ] > 0) do={
+ :if ([ :len [ /caps-man/actual-interface-configuration/find where configuration.ssid=$Ssid !disabled ] ] > 0) do={
:foreach SeenSsid in=$Seen do={
:if ($SeenSsid = $Ssid) do={
$LogPrintExit2 debug $0 ("Already sent a mail for SSID " . $Ssid . ", skipping.") false;