gnu-social/docker/mail/rootfs/usr/bin/start.sh

22 lines
494 B
Bash
Raw Normal View History

#!/bin/sh
2020-10-31 17:19:13 +00:00
# Run openssl
if [ ! -e "${SSL_CERT}" ]
then
mkdir -p "$(dirname ${SSL_CERT})" "$(dirname $SSL_KEY)"
openssl req -x509 -nodes -newkey rsa:2018 -days 365 -keyout "${SSL_CERT}" -out "${SSL_KEY}"
fi
2020-10-31 17:19:13 +00:00
# Run opendkim
if [ ! -e "/var/opendkim/keys/default.private" ]
then
opendkim-genkey -d "${DOMAINNAME}" -D "/var/opendkim/keys/"
2020-10-31 17:19:13 +00:00
fi
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
# Run services
s6-svscan /etc/service