Community discussions

MikroTik App
 
teamer
just joined
Topic Author
Posts: 21
Joined: Mon Sep 12, 2016 9:18 am

[Q] Current ssh/web session id and on-login script autoexecution

Sat Sep 02, 2017 8:46 pm

Hi!

Is there any way to determine my current ssh or web session in /user active?
I.e. I want to run script which adds my local machine (from which I connect to Mikrotik) ip address to specific address-list.

Something like:
/ip firewall address-list
  add list=FreeInternet address=[/user active get [find name=freeinternet] address] timeout=600s
but for any user running this script and only current user session although there may be several.

Is there any way to autoexecute script when certain user logs in? Without a schedule inspecting /user active :)