mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
Framework: merge improvements from master
This commit is contained in:
parent
c778710902
commit
039ba92c89
6 changed files with 30 additions and 12 deletions
1
Makefile
1
Makefile
|
|
@ -15,6 +15,7 @@ list:
|
|||
@echo ${PLUGIN_DIR} -- $$(${MAKE} -C ${PLUGIN_DIR} -V PLUGIN_COMMENT)
|
||||
.endfor
|
||||
|
||||
# shared targets that are sane to run from the root directory
|
||||
TARGETS= lint sweep style style-fix clean
|
||||
|
||||
.for TARGET in ${TARGETS}
|
||||
|
|
|
|||
|
|
@ -115,10 +115,7 @@ scripts-auto:
|
|||
done; \
|
||||
fi
|
||||
@if [ -d ${.CURDIR}/src/opnsense/service/conf/actions.d ]; then \
|
||||
for SCRIPT in +POST_INSTALL +POST_DEINSTALL; do \
|
||||
cat ${TEMPLATESDIR}/actions.d >> \
|
||||
${DESTDIR}/$${SCRIPT}; \
|
||||
done; \
|
||||
cat ${TEMPLATESDIR}/actions.d >> ${DESTDIR}/+POST_INSTALL; \
|
||||
fi
|
||||
@if [ -d ${.CURDIR}/src/etc/rc.loader.d ]; then \
|
||||
for SCRIPT in +POST_INSTALL +POST_DEINSTALL; do \
|
||||
|
|
@ -126,12 +123,19 @@ scripts-auto:
|
|||
${DESTDIR}/$${SCRIPT}; \
|
||||
done; \
|
||||
fi
|
||||
@if [ -d ${.CURDIR}/src/opnsense/mvc/app/models ]; then \
|
||||
for FILE in $$(cd ${.CURDIR}/src/opnsense/mvc/app/models && \
|
||||
find -s . -depth 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#./}" >> \
|
||||
find -s . -depth 2 -type d); do \
|
||||
cat ${TEMPLATESDIR}/templates | \
|
||||
sed "s:%%ARG%%:$${FILE#./}:g" >> \
|
||||
${DESTDIR}/+POST_INSTALL; \
|
||||
done; \
|
||||
fi
|
||||
|
|
@ -207,6 +211,17 @@ package: check
|
|||
@${PKG} create -v -m ${WRKSRC} -r ${WRKSRC} \
|
||||
-p ${WRKSRC}/plist -o ${PKGDIR}
|
||||
|
||||
upgrade-check: check
|
||||
@if ! ${PKG} info ${PLUGIN_PKGNAME} > /dev/null; then \
|
||||
echo ">>> Cannot find package. Please run 'pkg install ${PLUGIN_PKGNAME}'" >&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
@rm -rf ${PKGDIR}
|
||||
|
||||
upgrade: upgrade-check package
|
||||
@${PKG} delete -fy ${PLUGIN_PKGNAME}
|
||||
@${PKG} add ${PKGDIR}/*.txz
|
||||
|
||||
mount: check
|
||||
mount_unionfs ${.CURDIR}/src ${DESTDIR}${LOCALBASE}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ net/ftp-proxy -- Control ftp-proxy processes
|
|||
net/haproxy -- Reliable, high performance TCP/HTTP load balancer
|
||||
net/igmp-proxy -- IGMP-Proxy Service
|
||||
net/l2tp -- L2TP server based on MPD5
|
||||
net/mdns-repeater -- Proxy multicast DNS between networks
|
||||
net/pppoe -- PPPoE server based on MPD5
|
||||
net/pptp -- PPTP server based on MPD5
|
||||
net/quagga -- Quagga Routing Suite
|
||||
|
|
@ -93,6 +94,7 @@ The make targets for any plugin directory:
|
|||
* install: install to target directory
|
||||
* lint: run syntax checks
|
||||
* package: creates a package
|
||||
* upgrade: upgrades existing package
|
||||
* remove: remove known files from target directory
|
||||
* style-fix: apply style fixes
|
||||
* style: run style checks
|
||||
|
|
|
|||
|
|
@ -1,4 +1 @@
|
|||
echo "Restarting configd"
|
||||
if /usr/local/etc/rc.d/configd status > /dev/null; then
|
||||
/usr/local/etc/rc.d/configd restart
|
||||
fi
|
||||
/usr/local/etc/rc.d/configd restart
|
||||
|
|
|
|||
1
Templates/models
Normal file
1
Templates/models
Normal file
|
|
@ -0,0 +1 @@
|
|||
/usr/local/opnsense/mvc/script/run_migrations.php %%ARG%%
|
||||
2
Templates/templates
Normal file
2
Templates/templates
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
echo -n "Reloading template %%ARG%%: "
|
||||
/usr/local/sbin/configctl template reload %%ARG%%
|
||||
Loading…
Reference in a new issue