aboutsummaryrefslogtreecommitdiffstats
path: root/hotspot-to-wpa-cleanup.capsman.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'hotspot-to-wpa-cleanup.capsman.rsc')
-rw-r--r--hotspot-to-wpa-cleanup.capsman.rsc21
1 files changed, 11 insertions, 10 deletions
diff --git a/hotspot-to-wpa-cleanup.capsman.rsc b/hotspot-to-wpa-cleanup.capsman.rsc
index 8a38213..e4ac967 100644
--- a/hotspot-to-wpa-cleanup.capsman.rsc
+++ b/hotspot-to-wpa-cleanup.capsman.rsc
@@ -1,21 +1,22 @@
#!rsc by RouterOS
# RouterOS script: hotspot-to-wpa-cleanup.capsman
-# Copyright (c) 2021-2024 Christian Hesse <mail@eworm.de>
-# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
+# Copyright (c) 2021-2025 Christian Hesse <mail@eworm.de>
+# https://rsc.eworm.de/COPYING.md
#
# provides: lease-script, order=80
-# requires RouterOS, version=7.14
+# requires RouterOS, version=7.15
+# requires device-mode, hotspot
#
# manage and clean up private WPA passphrase after hotspot login
-# https://git.eworm.de/cgit/routeros-scripts/about/doc/hotspot-to-wpa.md
+# https://rsc.eworm.de/doc/hotspot-to-wpa.md
#
# !! Do not edit this file, it is generated from template!
-:global GlobalFunctionsReady;
-:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-
:local ExitOK false;
-:do {
+:onerror Err {
+ :global GlobalConfigReady; :global GlobalFunctionsReady;
+ :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
+ do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ];
:global EitherOr;
@@ -74,6 +75,6 @@
/ip/dhcp-server/lease/remove $Lease;
}
}
-} on-error={
- :global ExitError; $ExitError $ExitOK [ :jobname ];
+} do={
+ :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}