mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-02 09:14:39 +02:00
global-config: merge loading overlay and snippets
This commit is contained in:
parent
a7cb3e520a
commit
1c61547284
1 changed files with 4 additions and 10 deletions
|
@ -243,20 +243,14 @@
|
||||||
"cert2-cn"="4n0th3r-s3cr3t";
|
"cert2-cn"="4n0th3r-s3cr3t";
|
||||||
};
|
};
|
||||||
|
|
||||||
# load custom settings from overlay
|
# load custom settings from overlay and snippets
|
||||||
# Warning: Do *NOT* copy this code to overlay!
|
# Warning: Do *NOT* copy this code to overlay!
|
||||||
:do {
|
:foreach Script in=([ /system/script/find where name="global-config-overlay" ], \
|
||||||
/system/script/run global-config-overlay;
|
[ /system/script/find where name~"^global-config-overlay.d/" ]) do={
|
||||||
} 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={
|
|
||||||
:do {
|
:do {
|
||||||
/system/script/run $Script;
|
/system/script/run $Script;
|
||||||
} on-error={
|
} on-error={
|
||||||
:log error ("Loading configuration from overlay snippet " . \
|
:log error ("Loading configuration from overlay or snippet " . \
|
||||||
[ /system/script/get $Script name ] . " failed!");
|
[ /system/script/get $Script name ] . " failed!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue