summaryrefslogtreecommitdiffstats
path: root/debian/netdata-apache2.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/netdata-apache2.postinst')
-rw-r--r--debian/netdata-apache2.postinst25
1 files changed, 8 insertions, 17 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
;;