From 5a4e678bdf91c55915dbbe89074e6bac05d7a967 Mon Sep 17 00:00:00 2001 From: thorstenspille Date: Sat, 15 Jan 2022 11:04:14 +0100 Subject: [PATCH] mailpiler: migration to debian bullseye --- src/mailpiler/constants-service.conf | 2 +- src/mailpiler/install-service.sh | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mailpiler/constants-service.conf b/src/mailpiler/constants-service.conf index f70dc46..91bfc92 100644 --- a/src/mailpiler/constants-service.conf +++ b/src/mailpiler/constants-service.conf @@ -8,7 +8,7 @@ # This file contains the project constants on service level # Debian Version, which will be installed -LXC_TEMPLATE_VERSION="debian-10-standard" +LXC_TEMPLATE_VERSION="debian-11-standard" # Create sharefs mountpoint LXC_MP="0" diff --git a/src/mailpiler/install-service.sh b/src/mailpiler/install-service.sh index e557b5d..6803d91 100644 --- a/src/mailpiler/install-service.sh +++ b/src/mailpiler/install-service.sh @@ -27,13 +27,13 @@ wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add - echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' -add-apt-repository 'deb [arch=amd64] https://mirror.wtnet.de/mariadb/repo/10.5/debian buster main' +add-apt-repository "deb [arch=amd64] https://mirror.wtnet.de/mariadb/repo/10.5/debian $(lsb_release -cs) main" apt update DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -qq build-essential libwrap0-dev libpst-dev tnef libytnef0-dev \ unrtf catdoc libtre-dev tre-agrep poppler-utils libzip-dev unixodbc libpq5 libpoppler-dev openssl libssl-dev memcached telnet nginx \ -mariadb-server default-libmysqlclient-dev python-mysqldb gcc libwrap0 libzip4 latex2rtf latex2html catdoc tnef zipcmp zipmerge ziptool libsodium23 \ +mariadb-server default-libmysqlclient-dev python3-mysqldb gcc libwrap0 libzip4 latex2rtf latex2html catdoc tnef zipcmp zipmerge ziptool libsodium23 \ php$PILER_PHP_VERSION-{fpm,common,ldap,mysql,cli,opcache,phpdbg,gd,memcache,json,readline,zip} DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt remove --purge -y -qq postfix @@ -118,12 +118,14 @@ sed -i "/server_name.*/a \\ sed -i "/^server {.*/i\ server {\n\ listen 80;\n\ - server_name $PILER_FQDN;\n\ + server_name _;\n\ server_tokens off;\n\ # HTTP to HTTPS redirect.\n\ return 301 https://$PILER_FQDN;\n\ }" /etc/nginx/sites-available/piler-nginx.conf +unlink /etc/nginx/sites-enabled/default + cp /usr/local/etc/piler/config-site.php /usr/local/etc/piler/config-site.php.bak sed -i "s|\$config\['SITE_URL'\] = .*|\$config\['SITE_URL'\] = 'https://$PILER_FQDN/';|" /usr/local/etc/piler/config-site.php cat >> /usr/local/etc/piler/config-site.php <