|
@@ -552,7 +552,9 @@ function script_to_make_self_signed_certificates {
|
552
|
552
|
echo 'chmod 400 /etc/ssl/private/$HOSTNAME.key' >> /usr/bin/makecert
|
553
|
553
|
echo 'chmod 640 /etc/ssl/certs/$HOSTNAME.crt' >> /usr/bin/makecert
|
554
|
554
|
echo 'chmod 640 /etc/ssl/certs/$HOSTNAME.dhparam' >> /usr/bin/makecert
|
555
|
|
- echo '/etc/init.d/nginx reload' >> /usr/bin/makecert
|
|
555
|
+ echo 'if [ -f /etc/init.d/nginx ]; then' >> /usr/bin/makecert
|
|
556
|
+ echo ' /etc/init.d/nginx reload' >> /usr/bin/makecert
|
|
557
|
+ echo 'fi'
|
556
|
558
|
echo '# add the public certificate to a separate directory' >> /usr/bin/makecert
|
557
|
559
|
echo '# so that we can redistribute it easily' >> /usr/bin/makecert
|
558
|
560
|
echo 'if [ ! -d /etc/ssl/mycerts ]; then' >> /usr/bin/makecert
|
|
@@ -600,7 +602,9 @@ function configure_email {
|
600
|
602
|
sed -i '/login_saslauthd_server/,/.endif/ s/# *//' /etc/exim4/exim4.conf.template
|
601
|
603
|
sed -i "/.ifdef MAIN_HARDCODE_PRIMARY_HOSTNAME/i\MAIN_HARDCODE_PRIMARY_HOSTNAME = $DOMAIN_NAME\nMAIN_TLS_ENABLE = true" /etc/exim4/exim4.conf.template
|
602
|
604
|
sed -i "s|SMTPLISTENEROPTIONS=''|SMTPLISTENEROPTIONS='-oX 465:25:587 -oP /var/run/exim4/exim.pid'|g" /etc/default/exim4
|
603
|
|
- sed -i '/03_exim4-config_tlsoptions/a\tls_on_connect_ports=465' /etc/exim4/exim4.conf.template
|
|
605
|
+ if ! grep -Fxq "tls_on_connect_ports=465" /etc/exim4/exim4.conf.template; then
|
|
606
|
+ sed -i '/03_exim4-config_tlsoptions/a\tls_on_connect_ports=465' /etc/exim4/exim4.conf.template
|
|
607
|
+ fi
|
604
|
608
|
|
605
|
609
|
adduser $MY_USERNAME sasl
|
606
|
610
|
addgroup Debian-exim sasl
|