mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
ppp-on-up: use $LogPrintExit2
This will never print to terminal, nevertheless we want proper log with script name in prefix.
This commit is contained in:
parent
f26b3da342
commit
39b7bddf49
1 changed files with 3 additions and 3 deletions
|
@ -19,16 +19,16 @@
|
|||
}
|
||||
|
||||
:local IntName [ / interface get $Interface name ];
|
||||
:log info ("PPP interface " . $IntName . " is up.");
|
||||
$LogPrintExit2 info $0 ("PPP interface " . $IntName . " is up.") false;
|
||||
|
||||
/ ipv6 dhcp-client release [ find where interface=$IntName !disabled ];
|
||||
|
||||
:foreach Script in=[ / system script find where source~("\n# provides: ppp-on-up\n") ] do={
|
||||
:local ScriptName [ / system script get $Script name ];
|
||||
:do {
|
||||
:log debug ("Running script from ppp-on-up: " . $ScriptName);
|
||||
$LogPrintExit2 debug $0 ("Running script: " . $ScriptName) false;
|
||||
/ system script run $Script;
|
||||
} on-error={
|
||||
:log warning ("Running script '" . $ScriptName . "' from ppp-on-up failed!");
|
||||
$LogPrintExit2 warning $0 ("Running script '" . $ScriptName . "' failed!") false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue