Community discussions

MikroTik App
 
vlada92
just joined
Topic Author
Posts: 3
Joined: Fri Mar 10, 2017 1:04 pm

auto.rsc Script for hotspot user

Fri Mar 10, 2017 1:22 pm

Hi, I'm new to scripting and can't resolve a problem with mikrotik. I'm making hotspot that need to run some commands from server etc.. so I wrote down simple script (it's a basicly "do command script" ) to make a new user in hotspot

:do { /ip hotspot user add limit-uptime=1m name=user password=user123 server=Htospot }

and when I run it from winbox system->script it works fine, adds new user with all the information, but problem occurs when I make auto.rsc file with the same command and when I import script trough FTP I get log message
"expected end of command (line 1 column 17)"

Can't figure it out, why is it working trough the winbox but won't work trough the FTP auto.rsc import.

Thanks
 
User avatar
ahmedalmi
Frequent Visitor
Frequent Visitor
Posts: 75
Joined: Sat Sep 13, 2014 5:52 pm
Location: sana'a yemen
Contact:

Re: auto.rsc Script for hotspot user

Sat Apr 29, 2017 10:05 pm

First set name of script file like this something.auto.rsc .
Then
into the script file best rule like this :
/ip hotspot user add limit-uptime=1m name=user password=user123 server=Htospot ;
without " do { } " .

be sure your user have write policies

Who is online

Users browsing this forum: Bing [Bot] and 31 guests