#!/bin/sh -e

if [ "$1" = "configure" ]; then

    if [ -d /etc/apache2/conf.d ] && [ ! -f /etc/apache2/conf.d/zabbix ] && [ ! -h /etc/apache2/conf.d/zabbix ]; then
        ln -s /etc/zabbix/web/apache.conf /etc/apache2/conf.d/zabbix
    elif [ -d /etc/apache2/conf-available ] && [ ! -f /etc/apache2/conf-available/zabbix.conf ] && [ ! -h /etc/apache2/conf-available/zabbix.conf ] && [ -x /usr/sbin/a2enconf ]; then
        ln -s /etc/zabbix/web/apache.conf /etc/apache2/conf-available/zabbix.conf
        /usr/sbin/a2enconf zabbix.conf
    fi

fi

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
