diff options
Diffstat (limited to 'daily-psk.template')
-rw-r--r-- | daily-psk.template | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/daily-psk.template b/daily-psk.template index 373cc96..811f2f8 100644 --- a/daily-psk.template +++ b/daily-psk.template @@ -63,9 +63,11 @@ $WaitFullyConnected; :foreach AccList in=[ /%PATH%/access-list/find where comment~$DailyPskMatchComment ] do={ :local IntName [ /interface/wireless/access-list/get $AccList interface ]; :local Ssid [ /interface/wireless/get $IntName ssid ]; - :local Ssid [ /caps-man/access-list/get $AccList ssid-regexp ]; - :local Configuration [ /caps-man/configuration/get ([ find where ssid=$Ssid ]->0) name ]; :local OldPsk [ /interface/wireless/access-list/get $AccList private-pre-shared-key ]; + # /interface/wireless above - /caps-man below + :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; @@ -75,7 +77,7 @@ $WaitFullyConnected; /caps-man/access-list/set $AccList private-passphrase=$NewPsk; :if ([ :len [ /interface/wireless/find where name=$IntName !disabled ] ] = 1) do={ - :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; |