mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Framework: add a migration argument
This is for future use, right now it's not supported.
This commit is contained in:
+8
-4
@@ -129,14 +129,18 @@ scripts-auto:
|
||||
done; \
|
||||
fi
|
||||
@if [ -d ${.CURDIR}/src/opnsense/mvc/app/models ]; then \
|
||||
cat ${TEMPLATESDIR}/models >> ${DESTDIR}/+POST_INSTALL; \
|
||||
for FILE in $$(cd ${.CURDIR}/src/opnsense/service/templates && \
|
||||
find -s . -mindepth 2 -type d); do \
|
||||
cat ${TEMPLATESDIR}/models | \
|
||||
sed "s:%%ARG%%:$${FILE#./}:g" >> \
|
||||
${DESTDIR}/+POST_INSTALL; \
|
||||
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 "echo -n \"Reloading template $${FILE#./}: \"" >> \
|
||||
${DESTDIR}/+POST_INSTALL; \
|
||||
echo "/usr/local/sbin/configctl template reload $${FILE#./}" >> \
|
||||
cat ${TEMPLATESDIR}/templates | \
|
||||
sed "s:%%ARG%%:$${FILE#./}:g" >> \
|
||||
${DESTDIR}/+POST_INSTALL; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
echo "Running migration"
|
||||
/usr/local/opnsense/mvc/script/run_migrations.php
|
||||
echo "Migrating %%ARG%%"
|
||||
/usr/local/opnsense/mvc/script/run_migrations.php %%ARG%%
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
echo -n "Reloading template %%ARG%%: "
|
||||
/usr/local/sbin/configctl template reload %%ARG%%
|
||||
Reference in New Issue
Block a user