aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--daily-psk.capsman14
-rw-r--r--daily-psk.local14
-rw-r--r--daily-psk.template24
3 files changed, 26 insertions, 26 deletions
diff --git a/daily-psk.capsman b/daily-psk.capsman
index 944d52c..9f81be5 100644
--- a/daily-psk.capsman
+++ b/daily-psk.capsman
@@ -56,20 +56,20 @@ $WaitFullyConnected;
}
:local Seen [ :toarray "" ];
-:local Date [ / system clock get date ];
+:local Date [ /system/clock/get date ];
: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 OldPsk [ / caps-man access-list get $AccList private-passphrase ];
+: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 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;
- / caps-man access-list set $AccList private-passphrase=$NewPsk;
+ /caps-man/access-list/set $AccList private-passphrase=$NewPsk;
- :if ([ :len [ / caps-man interface find where configuration=$Configuration ] ] > 0) 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;
diff --git a/daily-psk.local b/daily-psk.local
index 022b4a3..23df467 100644
--- a/daily-psk.local
+++ b/daily-psk.local
@@ -56,20 +56,20 @@ $WaitFullyConnected;
}
:local Seen [ :toarray "" ];
-:local Date [ / system clock get date ];
+:local Date [ /system/clock/get date ];
:local NewPsk [ $GeneratePSK $Date ];
-:foreach AccList in=[ / interface wireless access-list find where comment~$DailyPskMatchComment ] do={
- :local IntName [ / interface wireless access-list get $AccList interface ];
- :local Ssid [ / interface wireless get $IntName ssid ];
- :local OldPsk [ / interface wireless access-list get $AccList private-pre-shared-key ];
+:foreach AccList in=[ /interface/wireless/access-list/find where comment~$DailyPskMatchComment ] do={
+ :local IntName [ /interface/wireless/access-list/get $AccList interface ];
+ :local Ssid [ /interface/wireless/get $IntName ssid ];
+ :local OldPsk [ /interface/wireless/access-list/get $AccList private-pre-shared-key ];
: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;
+ /interface/wireless/access-list/set $AccList private-pre-shared-key=$NewPsk;
- :if ([ :len [ / interface wireless find where name=$IntName disabled=no ] ] = 1) do={
+ :if ([ :len [ /interface/wireless/find where name=$IntName disabled=no ] ] = 1) do={
:foreach SeenSsid in=$Seen do={
:if ($SeenSsid = $Ssid) do={
$LogPrintExit2 debug $0 ("Already sent a mail for SSID " . $Ssid . ", skipping.") false;
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;