Community discussions

MikroTik App
 
vagner
just joined
Topic Author
Posts: 4
Joined: Wed Apr 13, 2022 6:34 pm
Location: Brazil
Contact:

Comando ou Script para ativar campo "Trial"

Fri Oct 27, 2023 8:16 pm

Hello friends of the community, I'm a beginner here and I would like to ask for some help!

I would like to create or see what command I could execute to activate and deactivate the "Trial" field in:

IP - Hotspot - Server Profiles - (server name) - login tab - "TRIAL"

How can I create a command for me to execute via terminal or script to ACTIVATE and DISABLE this option?

Imagem1.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12014
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Comando ou Script para ativar campo "Trial"

Sat Oct 28, 2023 1:56 pm

Is not one "flag" on or off.
Is one array where trial is present or not...

If you're not familiar with scripting, better leave it alone.

radnom code

foreach item on array,
    copy the value in new array except if is "trial" and must removed,
        if trial must be added,
            if trial is not already present, add trial at the end
 
vagner
just joined
Topic Author
Posts: 4
Joined: Wed Apr 13, 2022 6:34 pm
Location: Brazil
Contact:

Re: Comando ou Script para ativar campo "Trial"

Mon Oct 30, 2023 1:04 pm

Hello my friends!

It's resolved!!

I was able to create the command to "Enable" and "Disable" = IP HOTSPOT PROFILE = TRIAL.

If anyone needs it, just run and test:

COMMAND TO ACTIVATE:

ip hotspot profile set [find name=test] login-by=http-chap,mac-cookie,trial

COMMAND TO DISABLE:

ip hotspot profile set [find name=test] login-by=http-chap,mac-cookie


THANKSSS!!!! ;)

Who is online

Users browsing this forum: No registered users and 9 guests