mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-12-27 12:39:31 +00:00
hotspot-to-wpa: support non-local users
This has some limitations, though: The password is not known and additional configuration can not be given in user's comment.
This commit is contained in:
parent
5ba34c819a
commit
f8a2b88692
4 changed files with 9 additions and 2 deletions
|
|
@ -25,7 +25,10 @@ $ScriptLock $0;
|
|||
}
|
||||
|
||||
:local Date [ /system/clock/get date ];
|
||||
:local UserVal [ /ip/hotspot/user/get [ find where name=$UserName ] ];
|
||||
:local UserVal ({});
|
||||
:if ([ :len [ /ip/hotspot/user/find where name=$UserName ] ] > 0) do={
|
||||
:set UserVal [ /ip/hotspot/user/get [ find where name=$UserName ] ];
|
||||
}
|
||||
:local UserInfo [ $ParseKeyValueStore ($UserVal->"comment") ];
|
||||
:local Hotspot [ /ip/hotspot/host/get [ find where mac-address=$MacAddress authorized ] server ];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue