aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-04-03 22:51:15 +0200
committerGravatar Christian Hesse <mail@eworm.de>2019-04-03 22:51:15 +0200
commit228ec7106bd22e4ccca32e1b35ef2f7b70fddf57 (patch)
tree7cbd035a3fe79d9b50ec708b480c5703f01a1fb7
parentb35c0b8a6f6373201cc9e252a8647935ad54ee19 (diff)
daily-psk: use the template system
-rw-r--r--daily-psk.capsman2
-rw-r--r--daily-psk.local2
-rw-r--r--daily-psk.template6
3 files changed, 8 insertions, 2 deletions
diff --git a/daily-psk.capsman b/daily-psk.capsman
index 2783afa..ff0b658 100644
--- a/daily-psk.capsman
+++ b/daily-psk.capsman
@@ -4,6 +4,8 @@
# Michael Gisbers <michael@gisbers.de>
#
# update daily PSK (pre shared key)
+#
+# !! Do not edit this file, it is generated from template!
:global Identity;
:global DailyPskMatchComment;
diff --git a/daily-psk.local b/daily-psk.local
index 363765f..1b994fd 100644
--- a/daily-psk.local
+++ b/daily-psk.local
@@ -4,6 +4,8 @@
# Michael Gisbers <michael@gisbers.de>
#
# update daily PSK (pre shared key)
+#
+# !! Do not edit this file, it is generated from template!
:global Identity;
:global DailyPskMatchComment;
diff --git a/daily-psk.template b/daily-psk.template
index a9d65f2..2044281 100644
--- a/daily-psk.template
+++ b/daily-psk.template
@@ -4,6 +4,9 @@
# Michael Gisbers <michael@gisbers.de>
#
# update daily PSK (pre shared key)
+#
+# !! This is just a template! Replace '%PATH%' with 'caps-man'
+# !! or 'interface wireless'!
:global Identity;
:global DailyPskMatchComment;
@@ -46,8 +49,7 @@
:local Date [ / system clock get date ];
:local NewPsk [ $GeneratePSK $Date ];
-:foreach AccList in=[ / interface wireless access-list find where comment~$DailyPskMatchComment ] do={
-:foreach AccList in=[ / caps-man access-list find where comment~$DailyPskMatchComment ] do={
+: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 ];