mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
hotspot-to-wpa: create template if missing
This commit is contained in:
parent
c132d28408
commit
3f8d3acd60
1 changed files with 7 additions and 2 deletions
|
@ -27,8 +27,13 @@
|
|||
}
|
||||
:local PlaceBefore ([ / caps-man access-list find where comment="--- hotspot-to-wpa above ---" disabled ]->0);
|
||||
|
||||
:local Template [ / caps-man access-list get ([ find where disabled \
|
||||
comment=("hotspot-to-wpa template " . $Hotspot) ]->0) ];
|
||||
:if ([ :len [ / caps-man access-list find where \
|
||||
comment=("hotspot-to-wpa template " . $Hotspot) disabled ] ] = 0) do={
|
||||
/ caps-man access-list add comment=("hotspot-to-wpa template " . $Hotspot) disabled=yes place-before=$PlaceBefore;
|
||||
$LogPrintExit2 warning $0 ("Added template in access-list for hotspot '" . $Hotspot . "'.") false;
|
||||
}
|
||||
:local Template [ / caps-man access-list get ([ find where \
|
||||
comment=("hotspot-to-wpa template " . $Hotspot) disabled ]->0) ];
|
||||
|
||||
:if ($Template->"action" = "reject") do={
|
||||
$LogPrintExit2 info $0 ("Ignoring login for hotspot '" . $Hotspot . "'.") true;
|
||||
|
|
Loading…
Reference in a new issue