Some changes to make SSL certificates presist across builds (untested)

This commit is contained in:
Val 2014-12-05 16:09:54 +00:00
parent eb767354bf
commit a2d893cd99

View File

@ -1,3 +1,19 @@
# Check if we have SSL certificates in config, otherwise copy it there
# First the key file
if [ -f /mail_settings/ssl-cert-snakeoil.key ]
then
cp /mail_settings/ssl-cert-snakeoil.key /etc/ssl/private/ssl-cert-snakeoil.key
else
cp /etc/ssl/private/ssl-cert-snakeoil.key /mail_settings/ssl-cert-snakeoil.key
fi
# Then the pem file
if [ -f /mail_settings/ssl-cert-snakeoil.pem ]
then
cp /mail_settings/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.pem
else
cp /etc/ssl/private/ssl-cert-snakeoil.pem /mail_settings/ssl-cert-snakeoil.pem
fi
# Copy OpenDKIM config
cp /mail_settings/opendkim.conf /etc/opendkim.conf
cp /mail_settings/mail.private /etc/dkim.key