aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-04-02 08:48:35 +0200
committerGravatar Christian Hesse <mail@eworm.de>2019-04-02 08:48:35 +0200
commit7b1c275cc2daabf29e2d027ebab3d8d2e5e07b33 (patch)
tree80dd56ce36e2ae7e4445fa41894aee007695b55a
parent594aef2aab8cc14a2d87b9ce23f00429559588d6 (diff)
script-updates: add option to ignore global-config changeschange-4
-rw-r--r--global-config3
-rw-r--r--global-config.changes1
-rw-r--r--global-functions2
-rw-r--r--script-updates3
4 files changed, 6 insertions, 3 deletions
diff --git a/global-config b/global-config
index b57c212..03c9a5c 100644
--- a/global-config
+++ b/global-config
@@ -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 "";
diff --git a/global-config.changes b/global-config.changes
index 86a130f..b1fae6e 100644
--- a/global-config.changes
+++ b/global-config.changes
@@ -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";
};
diff --git a/global-functions b/global-functions
index 69f2c36..e5dc072 100644
--- a/global-functions
+++ b/global-functions
@@ -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 "-";
diff --git a/script-updates b/script-updates
index d2390db..6ba953c 100644
--- a/script-updates
+++ b/script-updates
@@ -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;