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