mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07: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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user