diff options
author | Christian Hesse <mail@eworm.de> | 2022-05-12 11:03:06 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2022-05-12 11:03:06 +0200 |
commit | 48f0a2d21118a7bff7d598e84d9f606fb30bf07a (patch) | |
tree | fb9746502335552880823e9445cd4201414bb8eb /daily-psk.template | |
parent | 93ec9afe558ef6eba5d513fab359bb5f6618666d (diff) | |
parent | a71a3d5466548d05d27d31c446c62afdf2412070 (diff) |
Merge branch 'scripts' into ros-v7-path-syntax
Diffstat (limited to 'daily-psk.template')
-rw-r--r-- | daily-psk.template | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/daily-psk.template b/daily-psk.template index 5f7a832..aa05748 100644 --- a/daily-psk.template +++ b/daily-psk.template @@ -57,25 +57,25 @@ $WaitFullyConnected; } :local Seen [ :toarray "" ]; -:local Date [ / system clock get date ]; +:local Date [ /system/clock/get date ]; :local NewPsk [ $GeneratePSK $Date ]; -: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 ]; - :local OldPsk [ / caps-man access-list get $AccList private-passphrase ]; +: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 ]; + :local OldPsk [ /caps-man/access-list/get $AccList private-passphrase ]; :local Skip 0; :if ($NewPsk != $OldPsk) do={ $LogPrintExit2 info $0 ("Updating daily PSK for " . $Ssid . " to " . $NewPsk . " (was " . $OldPsk . ")") false; - / interface wireless access-list set $AccList private-pre-shared-key=$NewPsk; - / caps-man access-list set $AccList private-passphrase=$NewPsk; + /interface/wireless/access-list/set $AccList private-pre-shared-key=$NewPsk; + /caps-man/access-list/set $AccList private-passphrase=$NewPsk; - :if ([ :len [ / interface wireless find where name=$IntName disabled=no ] ] = 1) do={ - :if ([ :len [ / caps-man interface find where configuration=$Configuration ] ] > 0) do={ + :if ([ :len [ /interface/wireless/find where name=$IntName disabled=no ] ] = 1) do={ + :if ([ :len [ /caps-man/interface/find where configuration=$Configuration ] ] > 0) do={ :foreach SeenSsid in=$Seen do={ :if ($SeenSsid = $Ssid) do={ $LogPrintExit2 debug $0 ("Already sent a mail for SSID " . $Ssid . ", skipping.") false; |