From 5bd397642ab2e061ae20b12bccd8729b7c9a1bb1 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 22 Sep 2016 23:48:46 +0200 Subject: [PATCH] Mk: automate configd restart --- Mk/plugins.mk | 8 ++++++++ devel/helloworld/+POST_DEINSTALL | 0 devel/helloworld/+POST_INSTALL | 4 ---- devel/helloworld/+PRE_DEINSTALL | 0 devel/helloworld/+PRE_INSTALL | 0 net/haproxy/+POST_INSTALL | 4 ---- 6 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 devel/helloworld/+POST_DEINSTALL delete mode 100644 devel/helloworld/+POST_INSTALL delete mode 100644 devel/helloworld/+PRE_DEINSTALL delete mode 100644 devel/helloworld/+PRE_INSTALL delete mode 100644 net/haproxy/+POST_INSTALL diff --git a/Mk/plugins.mk b/Mk/plugins.mk index 235db3757..fa4e01c30 100644 --- a/Mk/plugins.mk +++ b/Mk/plugins.mk @@ -106,6 +106,14 @@ scripts-auto: echo '/usr/local/etc/rc.configure_firmware' >> ${DESTDIR}/$${SCRIPT}; \ done; \ fi + @if [ -d ${.CURDIR}/src/opnsense/service/conf/actions.d ]; then \ + for SCRIPT in +POST_INSTALL +POST_DEINSTALL; do \ + echo 'echo "Restarting configd"' >> ${DESTDIR}/$${SCRIPT}; \ + echo 'if /usr/local/etc/rc.d/configd status > /dev/null; then' >> ${DESTDIR}/$${SCRIPT}; \ + echo ' /usr/local/etc/rc.d/configd restart' >> ${DESTDIR}/$${SCRIPT}; \ + echo 'fi' >> ${DESTDIR}/$${SCRIPT}; \ + done; \ + fi install: check @mkdir -p ${DESTDIR}${LOCALBASE} diff --git a/devel/helloworld/+POST_DEINSTALL b/devel/helloworld/+POST_DEINSTALL deleted file mode 100644 index e69de29bb..000000000 diff --git a/devel/helloworld/+POST_INSTALL b/devel/helloworld/+POST_INSTALL deleted file mode 100644 index 92d649b8a..000000000 --- a/devel/helloworld/+POST_INSTALL +++ /dev/null @@ -1,4 +0,0 @@ -echo "restarting configd..." -if /usr/local/etc/rc.d/configd status > /dev/null; then - /usr/local/etc/rc.d/configd restart -fi diff --git a/devel/helloworld/+PRE_DEINSTALL b/devel/helloworld/+PRE_DEINSTALL deleted file mode 100644 index e69de29bb..000000000 diff --git a/devel/helloworld/+PRE_INSTALL b/devel/helloworld/+PRE_INSTALL deleted file mode 100644 index e69de29bb..000000000 diff --git a/net/haproxy/+POST_INSTALL b/net/haproxy/+POST_INSTALL deleted file mode 100644 index d2b4bc49f..000000000 --- a/net/haproxy/+POST_INSTALL +++ /dev/null @@ -1,4 +0,0 @@ -echo "Restarting configd" -if /usr/local/etc/rc.d/configd status > /dev/null; then - /usr/local/etc/rc.d/configd restart -fi