2020-10-27 11:21:10 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-10-31 17:19:13 +00:00
|
|
|
# Run openssl
|
2020-11-23 14:55:33 +00:00
|
|
|
if [ ! -e "${SSL_CERT}" ]
|
2020-10-27 11:21:10 +00:00
|
|
|
then
|
2020-11-23 14:55:33 +00:00
|
|
|
mkdir -p "$(dirname ${SSL_CERT})" "$(dirname $SSL_KEY)"
|
|
|
|
openssl req -x509 -nodes -newkey rsa:2018 -days 365 -keyout "${SSL_CERT}" -out "${SSL_KEY}"
|
2020-10-27 11:21:10 +00:00
|
|
|
fi
|
|
|
|
|
2020-10-31 17:19:13 +00:00
|
|
|
# Run opendkim
|
|
|
|
if [ ! -e "/var/opendkim/keys/default.private" ]
|
|
|
|
then
|
2020-11-23 14:55:33 +00:00
|
|
|
opendkim-genkey -d "${DOMAINNAME}" -D "/var/opendkim/keys/"
|
2020-10-31 17:19:13 +00:00
|
|
|
fi
|
2020-10-27 11:21:10 +00:00
|
|
|
|
2020-11-22 21:45:43 +00:00
|
|
|
postmap /etc/mail/aliases /etc/mail/domains /etc/mail/mailboxes /etc/mail/passwd
|
|
|
|
postfix reload
|
|
|
|
dovecot reload
|
2020-10-31 17:19:13 +00:00
|
|
|
|
2020-11-22 19:14:59 +00:00
|
|
|
# Run services
|
|
|
|
s6-svscan /etc/service
|