mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-05 06:42:21 -04:00
automate the template regeneration for provided templates for #46
Unfortunately, we need to reload all subdirs (minus the vendor directory). The "*" matcher is not very clever and cannot be coerced to match sub directories without potentially matching any directories longer than their name, e.g. "Sample*" vs "Sample2". Problem is when these are installed and the templates are wrongly regenerated. In theory this doesn't have any bad side effects, but it may be a potential pitfall to avoid now rather than later.
This commit is contained in:
parent
9dddf05c36
commit
633a22ff3a
1 changed files with 7 additions and 0 deletions
|
|
@ -124,6 +124,13 @@ scripts-auto:
|
|||
${DESTDIR}/$${SCRIPT}; \
|
||||
done; \
|
||||
fi
|
||||
@if [ -d ${.CURDIR}/src/opnsense/service/templates ]; then \
|
||||
for FILE in $$(cd ${.CURDIR}/src/opnsense/service/templates && \
|
||||
find -s . -mindepth 2 -type d); do \
|
||||
echo "/usr/local/sbin/configctl template reload $${FILE#./}" >> \
|
||||
${DESTDIR}/+POST_INSTALL; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
install: check
|
||||
@mkdir -p ${DESTDIR}${LOCALBASE}
|
||||
|
|
|
|||
Loading…
Reference in a new issue