mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-13 19:44:28 +02:00
lease-script: add error handling
This commit is contained in:
parent
2041390f55
commit
96a92bb30c
1 changed files with 6 additions and 2 deletions
|
@ -30,6 +30,10 @@
|
|||
|
||||
:foreach Script in=[ / system script find where source~("\n# provides: lease-script " . $State . "\n") ] do={
|
||||
:local ScriptName [ / system script get $Script name ];
|
||||
:do {
|
||||
:log debug ("Running script from lease-script: " . $ScriptName);
|
||||
/ system script run $Script;
|
||||
} on-error={
|
||||
:log warning ("Running script '" . $ScriptName . "' from lease-script failed!");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue