mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
script-updates: send global-config changes notification just once
This commit is contained in:
parent
7b1c275cc2
commit
ea73505ecc
|
@ -8,6 +8,7 @@
|
||||||
:global ExpectedConfigVersion 4;
|
:global ExpectedConfigVersion 4;
|
||||||
|
|
||||||
# global variables not to be changed by user
|
# global variables not to be changed by user
|
||||||
|
:global SentConfigChangesNotification "-";
|
||||||
:global SentRouterosUpdateNotification "-";
|
:global SentRouterosUpdateNotification "-";
|
||||||
:global SentLteFirmwareUpgradeNotification "-";
|
:global SentLteFirmwareUpgradeNotification "-";
|
||||||
:global Identity [ / system identity get name ];
|
:global Identity [ / system identity get name ];
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
#
|
#
|
||||||
# update installed scripts from file or url
|
# update installed scripts from file or url
|
||||||
|
|
||||||
:global GlobalConfigVersion;
|
|
||||||
:global ExpectedConfigVersion;
|
:global ExpectedConfigVersion;
|
||||||
|
:global GlobalConfigVersion;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
:global SentConfigChangesNotification;
|
||||||
:global ScriptUpdatesFetch;
|
:global ScriptUpdatesFetch;
|
||||||
:global ScriptUpdatesBaseUrl;
|
:global ScriptUpdatesBaseUrl;
|
||||||
:global ScriptUpdatesUrlSuffix;
|
:global ScriptUpdatesUrlSuffix;
|
||||||
|
@ -78,7 +79,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ($ScriptUpdatesConfigChangesIgnore!=true && $GlobalConfigVersion < $ExpectedConfigVersion) do={
|
:if ($ScriptUpdatesConfigChangesIgnore!=true && \
|
||||||
|
$SentConfigChangesNotification!=$ExpectedConfigVersion && \
|
||||||
|
$GlobalConfigVersion < $ExpectedConfigVersion) do={
|
||||||
:global GlobalConfigChanges;
|
:global GlobalConfigChanges;
|
||||||
:local ChangeLogCode;
|
:local ChangeLogCode;
|
||||||
:local Changes;
|
:local Changes;
|
||||||
|
@ -105,4 +108,5 @@
|
||||||
"GlobalConfigVersion (currently " . $GlobalConfigVersion . \
|
"GlobalConfigVersion (currently " . $GlobalConfigVersion . \
|
||||||
") to " . $ExpectedConfigVersion . " and re-run global-config.\n\n" . \
|
") to " . $ExpectedConfigVersion . " and re-run global-config.\n\n" . \
|
||||||
"Changes:" . $Changes);
|
"Changes:" . $Changes);
|
||||||
|
:set SentConfigChangesNotification $ExpectedConfigVersion;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue