#!/bin/sh

if CreoleGet activer_sympa > /dev/null 2>&1
then
    CreoleRun 'rm -f /etc/apache2/conf.d/sympa' mail
    CreoleRun 'echo "sympa sympa/dbconfig-install boolean false" | debconf-set-selections' mail
    if [ "$(CreoleGet activer_sympa)" = "non" ]; then
        if dpkg-query -s eole-scribe-all > /dev/null 2>&1; then
            CreoleRun "apt -y update" mail
            CreoleRun "apt -y install eole-scribe-all" mail
        fi
        CreoleRun 'apt -y remove sympa' mail
    fi
fi
