jos izmjena za apache 2.4
[mailman-cn.git] / debian / postinst
index 11f8e3b..a89c76d 100755 (executable)
@@ -18,8 +18,15 @@ if [ ! -L /usr/lib/mailman/Mailman/mm_cfg.py -a -f /usr/lib/mailman/Mailman/mm_c
   ln -sf /etc/mailman/mm_cfg.py /usr/lib/mailman/Mailman/mm_cfg.py
 fi
 
-if [ ! -L /etc/apache2/conf.d/mailman-cn.conf -a ! -f /etc/apache2/conf.d/mailman-cn.conf ]; then
-  ln -sf /etc/mailman/apache.conf /etc/apache2/conf.d/mailman-cn.conf
+if [ ! -L /etc/apache2/conf-available/mailman-cn.conf -a ! -f /etc/apache2/conf-available/mailman-cn.conf ]; then
+  ln -sf /etc/mailman/apache.conf /etc/apache2/conf-available/mailman-cn.conf
+fi
+
+a2enconf mailman-cn
+a2enmod cgid
+
+if [ -L /etc/apache2/conf.d/mailman-cn.conf ]; then
+  rm -f /etc/apache2/conf.d/mailman-cn.conf
 fi
 
 hostname="`hostname --fqdn`"
@@ -167,15 +174,13 @@ db_go || true
 db_stop || true
 
 # restart mailman
-if [ "$restart" = "yes" -a -x /etc/init.d/mailman -a -x /usr/sbin/invoke-rc.d ]; then
-  invoke-rc.d mailman stop
-  invoke-rc.d mailman start
+if [ "$restart" = "yes" ]; then
+  service mailman stop
+  service mailman start
 fi
 
 # reload apache2 
-if [ -x /usr/sbin/invoke-rc.d -a -x /etc/init.d/apache2 ]; then
-  invoke-rc.d apache2 reload
-fi
+service apache2 reload
 
 # promjena passworda
 echo
@@ -186,3 +191,5 @@ if [ ! -f /var/lib/mailman/data/adm.pw ]; then
   echo "CN:"
 fi
 echo "CN: Web interface is at http://$hostname/cgi-bin/mailman/admin"
+
+#DEBHELPER#