From 8039c61889e568a52c490c02ae2f817f4a734def Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Wed, 29 Apr 2020 15:08:54 +0200 Subject: [PATCH] install script for debian 10 (mailtrain v2beta) --- setup/functions | 27 ++++++++++++++++++++++++--- setup/install-debian10-https.sh | 11 +++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 setup/install-debian10-https.sh diff --git a/setup/functions b/setup/functions index ba59b9ad..fc691c28 100644 --- a/setup/functions +++ b/setup/functions @@ -29,6 +29,17 @@ case "$hostType" in apacheConf="/etc/apache2/conf-available/mailtrain.conf" apacheLogsPath="/var/log/apache2" + if hash ufw 2>/dev/null; then + firewallCmdExists=yes + fi + ;; + + debian10) + hostTypeLabel="Debian 10" + redisService=redis-server + apacheConf="/etc/apache2/conf-available/mailtrain.conf" + apacheLogsPath="/var/log/apache2" + if hash ufw 2>/dev/null; then firewallCmdExists=yes fi @@ -162,6 +173,15 @@ EOT apt-get install -y mariadb-server nodejs imagemagick redis pwgen g++ make mongodb-org bzip2 ;; + + debian10) + apt-get install -y gnupg + wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add - + echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list + apt-get update + apt-get install -y mariadb-server nodejs imagemagick redis pwgen g++ make mongodb-org bzip2 npm + ;; + esac @@ -307,7 +327,7 @@ function installHttpd { fi ;; - ubuntu1804) + ubuntu1804|debian10) apt-get install -y apache2 if [ -n "$firewallCmdExists" ]; then @@ -317,6 +337,7 @@ function installHttpd { done fi ;; + esac } @@ -430,7 +451,7 @@ EOT systemctl restart httpd ;; - ubuntu1804) + ubuntu1804|debian10) a2enmod ssl a2enmod rewrite a2enmod proxy @@ -460,7 +481,7 @@ function createCertificates { dnf install -y certbot ;; - ubuntu1804) + ubuntu1804|debian10) apt-get install -y certbot python3-certbot-apache ;; esac diff --git a/setup/install-debian10-https.sh b/setup/install-debian10-https.sh new file mode 100644 index 00000000..c4595cae --- /dev/null +++ b/setup/install-debian10-https.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +hostType=debian10 + +SCRIPT_PATH=$(dirname $(realpath -s $0)) +. $SCRIPT_PATH/functions +cd $SCRIPT_PATH/.. + +performInstallHttps "$#" "$1" "$2" "$3" "$4"