mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: $ScriptInstallUpdate: fix change notification
In RouterOS functions are of type 'array' with 'code' (numerical index 1) inside. Cast to string to make comparison work. Also define the function to make it available.
This commit is contained in:
parent
148a7f93a6
commit
2db73a189c
1 changed files with 3 additions and 2 deletions
|
@ -592,6 +592,7 @@
|
|||
:global CertificateAvailable;
|
||||
:global LogPrintExit;
|
||||
:global ParseKeyValueStore;
|
||||
:global ScriptInstallUpdate;
|
||||
:global SendNotification;
|
||||
:global SymbolForNotification;
|
||||
|
||||
|
@ -606,7 +607,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
:local ScriptInstallUpdateBefore $ScriptInstallUpdate;
|
||||
:local ScriptInstallUpdateBefore [ :tostr $ScriptInstallUpdate ];
|
||||
|
||||
:foreach Script in=[ / system script find where source~"^#!rsc( by RouterOS)\?\n" ] do={
|
||||
:local ScriptVal [ / system script get $Script ];
|
||||
|
@ -747,7 +748,7 @@
|
|||
:set SentConfigChangesNotification $ExpectedConfigVersion;
|
||||
}
|
||||
|
||||
:if ($ScriptInstallUpdateBefore != $ScriptInstallUpdate) do={
|
||||
:if ($ScriptInstallUpdateBefore != [ :tostr $ScriptInstallUpdate ]) do={
|
||||
$LogPrintExit info ("This function '\$ScriptInstallUpdate' changed, you may want to re-run.") false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue