summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-08-14 12:38:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-08-14 12:38:05 +0000
commit3261575b7d890d2a2f400fcfa2d7e1b80624847c (patch)
tree66b391e41630d5af897308f5a2a4cb8a00c9ff6b
parentAdding lintian overrides for netdata-apache2. (diff)
downloadnetdata-3261575b7d890d2a2f400fcfa2d7e1b80624847c.tar.xz
netdata-3261575b7d890d2a2f400fcfa2d7e1b80624847c.zip
Using apache2-maintscript-helper in netdata-apache2 maintainer scripts.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/netdata-apache2.postinst25
-rw-r--r--debian/netdata-apache2.postrm10
2 files changed, 14 insertions, 21 deletions
diff --git a/debian/netdata-apache2.postinst b/debian/netdata-apache2.postinst
index 07fe736b3..7c8e0ce28 100644
--- a/debian/netdata-apache2.postinst
+++ b/debian/netdata-apache2.postinst
@@ -4,26 +4,17 @@ set -e
case "${1}" in
configure)
- if [ -x "$(which a2enmod)" ]
+ if [ -e /usr/share/apache2/apache2-maintscript-helper ]
then
- a2enmod proxy proxy_http rewrite
- fi
+ . /usr/share/apache2/apache2-maintscript-helper
- if [ -x "$(which a2enconf)" ]
- then
- a2enconf netdata
- fi
+ apache2_invoke enmod proxy
+ apache2_invoke enmod proxy_http
+ apache2_invoke enmod rewrite
- if [ -x "/etc/init.d/apache2" ]
- then
- if [ -n "${2}" ]
- then
- ACTION="restart"
- else
- ACTION="start"
- fi
-
- invoke-rc.d apache2 ${ACTION} || true
+ apache2_invoke enconf netdata.conf
+
+ apache2_reload restart
fi
;;
diff --git a/debian/netdata-apache2.postrm b/debian/netdata-apache2.postrm
index 655640367..b69fdbc16 100644
--- a/debian/netdata-apache2.postrm
+++ b/debian/netdata-apache2.postrm
@@ -4,11 +4,13 @@ set -e
case "${1}" in
remove)
- a2disconf netdata > /dev/null 2>&1 || true
-
- if [ -x /etc/init.d/apache2 ] && [ -e /run/apache2/apache2.pid ]
+ if [ -e /usr/share/apache2/apache2-maintscript-helper ]
then
- invoke-rc.d apache2 restart || true
+ . /usr/share/apache2/apache2-maintscript-helper
+
+ apache2_invoke disconf netdata.conf
+
+ apache2_reload restart
fi
;;