HotSpot auto login Script for all *nix and adaptation to OpenWRT GL-MT300N v1


On the Internet, I found a script that allows to automatically maintain permanent authorization in WISP mode when connecting to the hotspot (mikrotik standart: login / password). BUT I was not able to correctly run it on the GL-MT300N v1 even just for execution, not to mention the startup at boot.

LUCI Startup string: sh /usr/bin/ yj627p jxbvhp &
The original code and the corrected by me one and the same error:
BusyBox v1.24.1 (2016-09-08 17:43:22 HKT) built-in shell (ash)


root@GL-MT300N:~# /usr/bin/

-ash: /usr/bin/ not found

root@GL-MT300N:~# sh /usr/bin/

: not line 2:

: not line 10:

: not line 22:

: not line 29:

: not line 30:

: not line 31:

: not line 32:

/usr/bin/ line 232: syntax error: unexpected “done” (expecting "then ")


As it seems to me in the environment of the use of something that is not configured, but I could not make out in connection with which I ask you to help.
I think that if we manage to adapt the script, it will be very much in demand not only by me.
If there are any questions about mikrotik (very popular in Europe and Russia), I will try to answer to the best of my competence.

While for authorization I use this link in the browser
It also works on the MT300N according to the syntax of wget and curl.


This is firmware specific and I don’t think it can just works. I don’t have a Mikrotik router so I don’t know how it works.

Is there any link for reference?


Do not think for advertising …

Almost all modern HotSpot in hotels and cafes in Europe function using Mikrotik their solutions are the most flexible, reliable enough, easy to operate (there are graphical shells both web and graphic winbox) and most importantly for commercial operation are cost.

Mini info

manufacturer page

All hardware - router board - for it the unified operating system RouterOS

description customize HotSpot

a little later if you need for example I can post a web page mikrotik hotspot.

it seemed strange to me to react to empty lines of the script “>: not line 2:” in the runtime it’s obviously something wrong.


Can you tell me where I can find “”

Or do you have the content to post here?


The link in the first message is not underlined “corrected by me”, I tried to select it differently “bold” (very uncomfortable engine for the forum). When you click on a link to download a file, on the opened page, click the second button on the right.

The content of the file is quite large and uncomfortable for reading, that is why I did not place it in the post but gave link to it instead. If it is difficult or impossible to download it, I’ll post it here.




you can just zip and upload there.


OK, i upload it…




How can i debug this error?




I modified the file and now it runs on OpenWrt.

It was modified in windows causing it fails to execute in Linux.

It also has grammar errors and not sure how this was running. Use of [ ] was not correct.

Now it is your turn to debug