mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 01:49:28 +00:00
global-config: support loading snippets
This adds support for loading snippets, which need a name starting with "global-config-overlay.d/". This allows to split off configuration if desired.
This commit is contained in:
parent
e39e8a0083
commit
a7cb3e520a
4 changed files with 17 additions and 1 deletions
|
|
@ -250,3 +250,13 @@
|
|||
} 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 {
|
||||
/system/script/run $Script;
|
||||
} on-error={
|
||||
:log error ("Loading configuration from overlay snippet " . \
|
||||
[ /system/script/get $Script name ] . " failed!");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue