mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-10 18:14:27 +02:00
global-functions: $ScriptInstallUpdate: give hint on changes
This commit is contained in:
parent
99aaf642b2
commit
086a395e82
1 changed files with 6 additions and 0 deletions
|
@ -597,6 +597,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:local ScriptInstallUpdateBefore $ScriptInstallUpdate;
|
||||||
|
|
||||||
:foreach Script in=[ / system script find where source~"^#!rsc( by RouterOS)\?\n" ] do={
|
:foreach Script in=[ / system script find where source~"^#!rsc( by RouterOS)\?\n" ] do={
|
||||||
:local ScriptVal [ / system script get $Script ];
|
:local ScriptVal [ / system script get $Script ];
|
||||||
:local ScriptFile [ / file find where name=("script-updates/" . $ScriptVal->"name") ];
|
:local ScriptFile [ / file find where name=("script-updates/" . $ScriptVal->"name") ];
|
||||||
|
@ -735,6 +737,10 @@
|
||||||
$NotificationMessage $Link;
|
$NotificationMessage $Link;
|
||||||
:set SentConfigChangesNotification $ExpectedConfigVersion;
|
:set SentConfigChangesNotification $ExpectedConfigVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:if ($ScriptInstallUpdateBefore != $ScriptInstallUpdate) do={
|
||||||
|
$LogPrintExit info ("This function '\$ScriptInstallUpdate' changed, you may want to re-run.") false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# lock script against multiple invocation
|
# lock script against multiple invocation
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue