Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 23620

Scripting • hotspot new active

$
0
0
Hi guys and still happy new MT year everybody!

i create this script:


/export file=email
/tool e-mail send \
to="abc@def.com" from=abc@def.com \
subject="new user connected" body="$[/ip hotspot active get value-name=user number=0]" \
server=10.20.30.40

and in IP -> HOTSPOT -> USER PROFILES i add

/system script run mail

on "scripts" menù, ON LOGIN

it works fine for me, but it get only value-name first on the list (number=0)

so each time, when i have another logged user i "grep" always the same user value.
My purpose is to grep correct value username each time

anyone helps me to correct that?


Thx guys!
A

Statistics: Posted by ilpastore — Wed Jan 03, 2024 12:07 pm



Viewing all articles
Browse latest Browse all 23620

Trending Articles