Community discussions

MikroTik App
 
prince1990love
newbie
Topic Author
Posts: 32
Joined: Thu Oct 15, 2015 7:19 pm

Scripts modified?

Mon Mar 07, 2016 4:49 pm

hello everybody
can any one help me with this script!
i want script on user profile on-login for set user mac in his account in hotspot
and that is my script but not work !!!!
:local username [/ip hotspot active get $user user];
:local ip [/ip hotspot active get $user address];
:local mac [/ip hotspot active get $user mac-address];
/ip hotspot user { set "$user" mac-address=$mac };
what is worng?
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Scripts modified?

Mon Mar 07, 2016 6:16 pm

/ip hotspot user { set "$user" mac-address=$mac };
change this to:
/ip hotspot user set [ find where name=$username ] mac-address=$mac
 
prince1990love
newbie
Topic Author
Posts: 32
Joined: Thu Oct 15, 2015 7:19 pm

Re: Scripts modified?

Mon Mar 07, 2016 8:47 pm

:D thank you for reply that is work!