mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
script-updates: add option to ignore global-config changes
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
# Make sure all configuration properties are up to date and this
|
||||
# value is in sync with value in script 'global-functions'!
|
||||
:global GlobalConfigVersion 3;
|
||||
:global GlobalConfigVersion 4;
|
||||
|
||||
# This is used for DNS and backup file.
|
||||
:global Domain "example.com";
|
||||
@@ -93,6 +93,7 @@
|
||||
:global ScriptUpdatesIgnore {
|
||||
"global-config"
|
||||
}
|
||||
:global ScriptUpdatesConfigChangesIgnore false;
|
||||
|
||||
# Use this for certificate auto-renew
|
||||
:global CertRenewUrl "";
|
||||
|
@@ -6,4 +6,5 @@
|
||||
1="moved variables from global-config to global-functions for independence";
|
||||
2="variable names became CamelCase to work around scripting issues";
|
||||
3="variable for certificate renew passphrase became an array to support multiple passphrases";
|
||||
4="added option to ignore global-config changes";
|
||||
};
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# global functions
|
||||
|
||||
# expected configuration version
|
||||
:global ExpectedConfigVersion 3;
|
||||
:global ExpectedConfigVersion 4;
|
||||
|
||||
# global variables not to be changed by user
|
||||
:global SentRouterosUpdateNotification "-";
|
||||
|
@@ -11,6 +11,7 @@
|
||||
:global ScriptUpdatesBaseUrl;
|
||||
:global ScriptUpdatesUrlSuffix;
|
||||
:global ScriptUpdatesIgnore;
|
||||
:global ScriptUpdatesConfigChangesIgnore;
|
||||
|
||||
:global SendNotification;
|
||||
|
||||
@@ -77,7 +78,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:if ($GlobalConfigVersion < $ExpectedConfigVersion) do={
|
||||
:if ($ScriptUpdatesConfigChangesIgnore!=true && $GlobalConfigVersion < $ExpectedConfigVersion) do={
|
||||
:global GlobalConfigChanges;
|
||||
:local ChangeLogCode;
|
||||
:local Changes;
|
||||
|
Reference in New Issue
Block a user