[Q] Current ssh/web session id and on-login script autoexecution
Posted: 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: 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
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:
Code: Select all
/ip firewall address-list
add list=FreeInternet address=[/user active get [find name=freeinternet] address] timeout=600s
Is there any way to autoexecute script when certain user logs in? Without a schedule inspecting /user active