|
|
@ -8,12 +8,12 @@ FORCE=${FORCE:-false} |
|
|
|
|
|
|
|
|
function install_postfix { |
|
|
function install_postfix { |
|
|
if $FORCE || ! systemctl is-active postfix.service --quiet; then |
|
|
if $FORCE || ! systemctl is-active postfix.service --quiet; then |
|
|
debconf-set-selections <<EOF |
|
|
|
|
|
|
|
|
debconf-set-selections << EOF |
|
|
postfix postfix/mailname string $(hostname -f) |
|
|
postfix postfix/mailname string $(hostname -f) |
|
|
postfix postfix/main_mailer_type string 'Internet Site' |
|
|
postfix postfix/main_mailer_type string 'Internet Site' |
|
|
postfix postfix/mynetworks string '127.0.0.0/8' |
|
|
postfix postfix/mynetworks string '127.0.0.0/8' |
|
|
EOF |
|
|
EOF |
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y postfix postgresql nginx fcgiwrap perl-doc micro debconf-utils |
|
|
|
|
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y postfix postgresql nginx fcgiwrap perl-doc micro debconf-utils certbot python3-certbot-nginx |
|
|
postconf -e "inet_protocols = ipv4" |
|
|
postconf -e "inet_protocols = ipv4" |
|
|
systemctl restart postfix |
|
|
systemctl restart postfix |
|
|
echo postfix installed successfully! |
|
|
echo postfix installed successfully! |
|
|
@ -33,7 +33,7 @@ function install_sympa { |
|
|
if $FORCE || ! systemctl is-active wwsympa.service --quiet; then |
|
|
if $FORCE || ! systemctl is-active wwsympa.service --quiet; then |
|
|
listmasters="pvincent@artcode.re,jnoel@mithril.re" |
|
|
listmasters="pvincent@artcode.re,jnoel@mithril.re" |
|
|
[[ $(hostname -d) == *.* ]] && listmasters+=",listmaster@$(hostname -d)" || true |
|
|
[[ $(hostname -d) == *.* ]] && listmasters+=",listmaster@$(hostname -d)" || true |
|
|
debconf-set-selections <<EOF |
|
|
|
|
|
|
|
|
debconf-set-selections << EOF |
|
|
sympa wwsympa/webserver_type select 'Other' |
|
|
sympa wwsympa/webserver_type select 'Other' |
|
|
sympa sympa/database-type string pgsql |
|
|
sympa sympa/database-type string pgsql |
|
|
sympa sympa/db_host string localhost |
|
|
sympa sympa/db_host string localhost |
|
|
@ -55,7 +55,7 @@ EOF |
|
|
|
|
|
|
|
|
function install_nginx_host { |
|
|
function install_nginx_host { |
|
|
if $FORCE || [[ ! -f /etc/nginx/sites-available/sympa.conf ]]; then |
|
|
if $FORCE || [[ ! -f /etc/nginx/sites-available/sympa.conf ]]; then |
|
|
cat <<EOF >/etc/nginx/sites-available/sympa.conf |
|
|
|
|
|
|
|
|
cat << EOF > /etc/nginx/sites-available/sympa.conf |
|
|
server { |
|
|
server { |
|
|
listen 80; |
|
|
listen 80; |
|
|
server_name _; |
|
|
server_name _; |
|
|
|