aboutsummaryrefslogtreecommitdiffstats
path: root/global-config.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-12 10:34:26 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-03-12 20:37:57 +0100
commit1c6154728411e206d651ad05fce093a80168f64f (patch)
tree257dc01888c4396288fd617c4d796da9e806e790 /global-config.rsc
parenta7cb3e520a86b44cb6e1bdfdf6df24856274e0e3 (diff)
global-config: merge loading overlay and snippets
Diffstat (limited to 'global-config.rsc')
-rw-r--r--global-config.rsc14
1 files changed, 4 insertions, 10 deletions
diff --git a/global-config.rsc b/global-config.rsc
index 85731c3..2b688bc 100644
--- a/global-config.rsc
+++ b/global-config.rsc
@@ -243,20 +243,14 @@
"cert2-cn"="4n0th3r-s3cr3t";
};
-# load custom settings from overlay
+# load custom settings from overlay and snippets
# Warning: Do *NOT* copy this code to overlay!
-:do {
- /system/script/run global-config-overlay;
-} on-error={
- :log error ("Loading configuration from overlay failed!");
-}
-
-# configuration overlay snippets
-:foreach Script in=[ /system/script/find where name ~ "^global-config-overlay.d/" ] do={
+:foreach Script in=([ /system/script/find where name="global-config-overlay" ], \
+ [ /system/script/find where name~"^global-config-overlay.d/" ]) do={
:do {
/system/script/run $Script;
} on-error={
- :log error ("Loading configuration from overlay snippet " . \
+ :log error ("Loading configuration from overlay or snippet " . \
[ /system/script/get $Script name ] . " failed!");
}
}