PPP Profile On Up Script dont run

Hello Everyone,

I have a script in system script, that i call from PPP Profile Up and Down Scripts,

It runs from Down Script, but dont runs from Up script call.
The script owner already is *sys as suggested in another topic.

Anyone have a sugestion?

Up Script:

{
:global mensagem "Interface L2TP conectou";
/system script run bot-mensagem
}

Down Script:

{
:global mensagem "Interface L2TP desconetou";
/system script run bot-mensagem
}

obviously you do not post that script and the routeros version used…

Sorry for that! Rextended.

I noticed it after posting.

The script is a Telegram Bot API, the version of ROS is the 6.48.6 ( :open_mouth: 6.49.6 ), also, i’ve tried it in 7.2.3, same behavior.

The script with sensitive data replaced:

{
:global mensagem;
:local hevento [/system clock get time];
/log info ("$mensagem")
/tool fetch url="https://api.telegram.org/bot<code>/sendMessage\?chat_id=<chat>&text=$hevento $mensagem" keep-result=no
}

Apparenly nothing wrong.

On system script environment, the global variable is updated?

Try to put the script directly inside instead on down script call another script

Yes, is there! =(

I've tried running "/tool fetch" directly in On Up, also dont work.
Also, running a simple "/log info ("message")" dont append to log the message...
If i call the script from terminal, with the same text, it works.

And now its working… :confused:
I made nothing… only disconected from device and take a nap…
Same configurations and same code posted above…

thank for the help @rextended!