Skip to content
Snippets Groups Projects
Commit f633fffe authored by greg.hill's avatar greg.hill
Browse files

Add Buster support to dovecot install script

parent 0876170f
No related branches found
No related tags found
No related merge requests found
......@@ -83,7 +83,12 @@ function sanity_checks() {
REV=$(awk -F= '/^VERSION_ID/{print $2}' /etc/os-release | tr -d \")
if [[ ${OS} = "debian" ]]; then
export DEBIAN_FRONTEND=noninteractive
if [[ ${REV} = "9" ]]; then
if [[ ${REV} = "10" ]]; then
DIST="DebianBuster"
COMPATIBLE=true
DC_REPO_PREFIX="apt"
DC_REPO_SUFFIX="debian/buster/ buster main"
elif [[ ${REV} = "9" ]]; then
DIST="DebianStretch"
COMPATIBLE=true
DC_REPO_PREFIX="apt"
......@@ -147,6 +152,7 @@ function sanity_checks() {
echo "* Debian GNU/Linux 7.0 (Wheezy)"
echo "* Debian GNU/Linux 8.0 (Jessie)"
echo "* Debian GNU/Linux 9.0 (Wheezy)"
echo "* Debian GNU/Linux 10.0 (Buster)"
echo "* Ubuntu 16.04 (Xenial Xerus)"
echo "* RedHat Enterprise Linux 6.0 (RHEL6)"
echo "* RedHat Enterprise Linux 7.0 (RHEL7)"
......@@ -155,7 +161,7 @@ function sanity_checks() {
exit 1
fi
if [[ ${DIST} == "DebianStretch" ]] || [[ ${DIST} == "DebianJessie" ]] || [[ ${DIST} == "DebianWheezy" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
if [[ ${DIST} == "DebianStretch" ]] || [[ ${DIST} == "DebianJessie" ]] || [[ ${DIST} == "DebianWheezy" ]] || [[ ${DIST} == "DebianBuster" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
if [[ ${DC_PRO} == true ]]; then
#IMAP_PACKAGES="dovecot-ee-*"
IMAP_PACKAGES="dovecot-ee-core dovecot-ee-imapd dovecot-ee-lmtpd dovecot-ee-sieve dovecot-ee-managesieved dovecot-ee-pop3d dovecot-ee-cassandra-plugin dovecot-ee-dovemon dovecot-ee-fts dovecot-ee-license dovecot-ee-lucene dovecot-ee-mail-crypt-plugin dovecot-ee-solr dovecot-ee-virtual-attachments-plugin"
......@@ -175,7 +181,7 @@ function sanity_checks() {
function generate_cert() {
echo "Generating certificate for $FQDN"
if [[ "${DIST}" == "DebianStretch" ]] || [[ "${DIST}" == "DebianJessie" ]] || [[ "${DIST}" == "DebianWheezy" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
if [[ "${DIST}" == "DebianStretch" ]] || [[ "${DIST}" == "DebianJessie" ]] || [[ "${DIST}" == "DebianWheezy" ]] || [[ "${DIST}" == "DebianBuster" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
SSL_DIR="/etc/ssl"
elif [[ "${DIST}" == "RHEL6" ]] || [[ "${DIST}" == "RHEL7" ]] || [[ "${DIST}" == "CentOS6" ]] || [[ "${DIST}" == "CentOS7" ]]; then
SSL_DIR="/etc/pki/tls"
......@@ -264,6 +270,8 @@ function add_repo_info {
URL=${URL}"jessie"
elif [[ ${DIST} == "DebianWheezy" ]]; then
URL=${URL}"wheezy"
elif [[ ${DIST} == "DebianBuster" ]]; then
URL=${URL}"buster"
fi
URL="${URL}-auto/dovecot-${DC_VERSION} main"
......@@ -283,7 +291,7 @@ function add_repo_info {
# Otherwise it may install outdated dovecot packages that are delievered with the distro
# write repo data
if [[ ${DIST} == "DebianStretch" ]] || [[ ${DIST} == "DebianJessie" ]] || [[ ${DIST} == "DebianWheezy" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
if [[ ${DIST} == "DebianStretch" ]] || [[ ${DIST} == "DebianJessie" ]] || [[ ${DIST} == "DebianWheezy" ]] || [[ ${DIST} == "DebianBuster" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
echo "deb ${URL}" > /etc/apt/sources.list.d/dovecot.list
if [[ -n ${DC_3RD_PARTY} ]]; then
......@@ -312,7 +320,7 @@ function add_repo_info {
function install_packages() {
# Adding OX App Suite and Dovecot repository build key
echo -n "Adding OX App Suite and Dovecot repository build key..."
if [[ "${DIST}" == "DebianStretch" ]] || [[ "${DIST}" == "DebianJessie" ]] || [[ "${DIST}" == "DebianWheezy" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
if [[ "${DIST}" == "DebianStretch" ]] || [[ "${DIST}" == "DebianJessie" ]] || [[ "${DIST}" == "DebianWheezy" ]] || [[ ${DIST} == "DebianBuster" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
wget -q ${AS_BUILDKEY} -O - | apt-key add -
wget -q ${DC_BUILDKEY} -O - | apt-key add -
elif [[ "${DIST}" == "RHEL6" ]] || [[ "${DIST}" == "RHEL7" ]]; then
......@@ -333,7 +341,7 @@ function install_packages() {
INSTALL_OPTIONS="-y "
if [[ ${DIST} == "DebianStretch" ]] || [[ ${DIST} == "DebianWheezy" ]] || [[ ${DIST} == "DebianJessie" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
if [[ ${DIST} == "DebianStretch" ]] || [[ ${DIST} == "DebianWheezy" ]] || [[ ${DIST} == "DebianJessie" ]] || [[ ${DIST} == "DebianBuster" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
if [[ true == "${POSTFIX}" ]]; then
echo "postfix postfix/main_mailer_type select Internet Site" | debconf-set-selections
echo "postfix postfix/mailname string $FQDN" | debconf-set-selections
......@@ -381,7 +389,7 @@ function configure_postfix() {
# uncomment the next line if you want debug output
#postconf -M smtp/inet="smtp inet n - - - - smtpd -v"
if [[ ${DIST} == "DebianStretch" ]] || [[ ${DIST} == "DebianWheezy" ]] || [[ ${DIST} == "DebianJessie" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
if [[ ${DIST} == "DebianStretch" ]] || [[ ${DIST} == "DebianWheezy" ]] || [[ ${DIST} == "DebianJessie" ]] || [[ ${DIST} == "DebianBuster" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
LDA_PATH="/usr/lib/dovecot/dovecot-lda"
else
LDA_PATH="/usr/libexec/dovecot/dovecot-lda"
......@@ -411,7 +419,7 @@ function configure_dovecot() {
if [[ "${DIST}" == "CentOS6" ]] || [[ "${DIST}" == "CentOS7" ]] || [[ "${DIST}" == "RHEL6" ]] || [[ "${DIST}" == "RHEL7" ]]; then
DC_DEFAULT_CONF_DIR="/usr/share/doc/dovecot-ee-*/example-config/conf.d/"
declare -a CONF_FILE_LIST=("10-mail.conf" "10-master.conf" "10-auth.conf" "10-ssl.conf" "10-logging.conf" "15-lda.conf" "20-imap.conf" "20-managesieve.conf" "90-quota.conf" "90-plugin.conf" "90-sieve.conf" "90-acl.conf" "auth-static.conf.ext" "../dovecot.conf")
elif [[ "${DIST}" == "DebianStretch" ]] || [[ "${DIST}" == "DebianWheezy" ]] || [[ "${DIST}" == "DebianJessie" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
elif [[ "${DIST}" == "DebianStretch" ]] || [[ "${DIST}" == "DebianWheezy" ]] || [[ "${DIST}" == "DebianJessie" ]] || [[ "${DIST}" == "DebianBuster" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
DC_DEFAULT_CONF_DIR="/usr/share/doc/dovecot-ee-core/example-config/conf.d/"
declare -a CONF_FILE_LIST=("10-master.conf" "10-logging.conf" "15-lda.conf" "10-ssl.conf" "20-imap.conf" "20-managesieve.conf" "90-quota.conf" "90-plugin.conf" "90-acl.conf" "auth-static.conf.ext")
......@@ -539,7 +547,7 @@ EOF
if [[ "${DIST}" == "CentOS6" ]] || [[ "${DIST}" == "CentOS7" ]] || [[ "${DIST}" == "RHEL6" ]] || [[ "${DIST}" == "RHEL7" ]]; then
DC_CERT_FILE="/etc/pki/dovecot/certs/dovecot.pem"
DC_KEY_FILE="/etc/pki/dovecot/private/dovecot.pem"
elif [[ "${DIST}" == "DebianStretch" ]] || [[ "${DIST}" == "DebianWheezy" ]] || [[ "${DIST}" == "DebianJessie" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
elif [[ "${DIST}" == "DebianStretch" ]] || [[ "${DIST}" == "DebianWheezy" ]] || [[ "${DIST}" == "DebianJessie" ]] || [[ "${DIST}" == "DebianBuster" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
if [[ true == "${DC_PRO}" ]]; then
DC_CERT_FILE="/etc/ssl/certs/dovecot.pem"
DC_KEY_FILE="/etc/ssl/private/dovecot.pem"
......@@ -561,7 +569,7 @@ EOF
else
cd /usr/libexec/dovecot/
fi
elif [[ "${DIST}" == "DebianStretch" ]] || [[ "${DIST}" == "DebianWheezy" ]] || [[ "${DIST}" == "DebianJessie" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
elif [[ "${DIST}" == "DebianStretch" ]] || [[ "${DIST}" == "DebianWheezy" ]] || [[ "${DIST}" == "DebianJessie" ]] || [[ "${DIST}" == "DebianBuster" ]] || [[ ${DIST} == "Ubuntu_16.04" ]]; then
if [[ true == "${DC_PRO}" ]]; then
cd /usr/share/doc/dovecot-ee-core/
else
......@@ -742,7 +750,7 @@ function prerequisites() {
}
function restart_services() {
if [[ "${DIST}" == "DebianWheezy" ]] || [[ "${DIST}" == "CentOS6" ]] || [[ "${DIST}" == "RHEL6" ]]; then
if [[ "${DIST}" == "DebianWheezy" ]] || [[ "${DIST}" == "DebianBuster" ]] || [[ "${DIST}" == "CentOS6" ]] || [[ "${DIST}" == "RHEL6" ]]; then
service dovecot restart
if [[ true == "${POSTFIX}" ]]; then
service postfix restart
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment