summaryrefslogtreecommitdiffstats
path: root/debian/netdata-apache2.postinst
diff options
context:
space:
mode:
authorKatharina Drexel <katharina.drexel@bfh.ch>2019-08-14 09:52:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-08-14 09:53:56 +0000
commit1fd5e7bce7c99083f31454b48190cb42227e5394 (patch)
tree0023ff0101e9aa7c6cc0b74a296a13c8b948b75c /debian/netdata-apache2.postinst
parenttypo fix in debian/rules: s/init/systemd/ (diff)
downloadnetdata-1fd5e7bce7c99083f31454b48190cb42227e5394.tar.xz
netdata-1fd5e7bce7c99083f31454b48190cb42227e5394.zip
adding package netdata-apache2
Signed-off-by: Katharina Drexel <katharina.drexel@bfh.ch> Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/netdata-apache2.postinst')
-rw-r--r--debian/netdata-apache2.postinst39
1 files changed, 39 insertions, 0 deletions
diff --git a/debian/netdata-apache2.postinst b/debian/netdata-apache2.postinst
new file mode 100644
index 000000000..565006d0c
--- /dev/null
+++ b/debian/netdata-apache2.postinst
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ configure)
+ if [ -x "$(which a2enmod)" ]
+ then
+ a2enmod proxy proxy_http rewrite
+ fi
+
+ if [ -x "$(which a2enconf)" ]
+ then
+ a2enconf netdata
+ fi
+
+ if [ -x "/etc/init.d/apache2" ]; then
+ if [ -n "$2" ]; then
+ _dh_action=restart
+ else
+ _dh_action=start
+ fi
+ invoke-rc.d apache2 $_dh_action || true
+ fi
+
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0