From fbbc08b49469b57d6cdee9fcfb81b6eef309ab95 Mon Sep 17 00:00:00 2001 From: LV-426 Date: Mon, 4 May 2015 03:04:43 +0300 Subject: debian/postinst: enable apache module only when needed --- res/debian/pkg__rhizi-mux/postinst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/res/debian/pkg__rhizi-mux/postinst b/res/debian/pkg__rhizi-mux/postinst index 44b87c5f..a65955fa 100644 --- a/res/debian/pkg__rhizi-mux/postinst +++ b/res/debian/pkg__rhizi-mux/postinst @@ -27,11 +27,12 @@ case "$1" in # configure apache - FIXME: impl undo echo 'enabling apache proxy modules - warning: this will not be reverted during package uninstall' - /usr/sbin/a2enmod deflate - /usr/sbin/a2enmod proxy - /usr/sbin/a2enmod proxy_http - /usr/sbin/a2enmod proxy_wstunnel - /usr/sbin/a2enmod rewrite + apache_mod_e_dir=/etc/apache2/mods-enabled + [ ! -e ${apache_mod_e_dir}/deflate.load ] && /usr/sbin/a2enmod deflate + [ ! -e ${apache_mod_e_dir}/proxy.load ] && /usr/sbin/a2enmod proxy + [ ! -e ${apache_mod_e_dir}/proxy_http.load ] && /usr/sbin/a2enmod proxy_http + [ ! -e ${apache_mod_e_dir}/proxy_wstunnel.load ] && /usr/sbin/a2enmod proxy_wstunnel + [ ! -e ${apache_mod_e_dir}/rewrite.load ] && /usr/sbin/a2enmod rewrite ;; -- cgit v1.3.1