1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

hotspot-to-wpa: support ignoring specific hotspot

This commit is contained in:
Christian Hesse
2022-03-07 22:26:41 +01:00
parent df0d826999
commit c1fa0f3579
2 changed files with 5 additions and 0 deletions

View File

@ -56,6 +56,7 @@ Create hotspot login credentials:
Additionally templates can be created to give more options for access list:
* `action`: set to `reject` to ignore logins on that hotspot
* `private-passphrase`: do **not** use passphrase from hotspot's user
credentials, but given one - or unset (use default passphrase) with
special word `ignore`

View File

@ -23,6 +23,10 @@
:local Template [ / caps-man access-list get ([ find where disabled \
comment=("hotspot-to-wpa template " . $Hotspot) ]->0) ];
:if ($Template->"action" = "reject") do={
$LogPrintExit2 info $0 ("Ignoring login for hotspot '" . $Hotspot . "'.") true;
}
:if ([ :len [ / caps-man access-list find where comment="--- hotspot-to-wpa above ---" disabled ] ] = 0) do={
/ caps-man access-list add comment="--- hotspot-to-wpa above ---" disabled=yes;
$LogPrintExit2 warning $0 ("Added disabled access-list entry with comment '--- hotspot-to-wpa above ---'.") false;