2020-10-27 20:21:10 +09:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-11-01 02:19:13 +09:00
|
|
|
# Run openssl
|
2020-11-08 02:43:25 +09:00
|
|
|
if [ ! -e "$SSL_CERT" ]
|
2020-10-27 20:21:10 +09:00
|
|
|
then
|
2020-11-08 02:43:25 +09: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 20:21:10 +09:00
|
|
|
fi
|
|
|
|
|
2020-11-01 02:19:13 +09:00
|
|
|
# Run opendkim
|
|
|
|
if [ ! -e "/var/opendkim/keys/default.private" ]
|
|
|
|
then
|
|
|
|
mkdir -p /var/opendkim/keys
|
|
|
|
opendkim-genkey -d "$DOMAINNAME" -D "/var/opendkim/keys"
|
|
|
|
fi
|
2020-10-27 20:21:10 +09:00
|
|
|
|
2020-11-19 22:43:15 +09:00
|
|
|
# Prepare postfix
|
2020-11-01 02:19:13 +09:00
|
|
|
if [ ! -d "/var/mail/$DOMAINNAME" ]
|
|
|
|
then
|
|
|
|
/usr/bin/new-domain.sh "$DOMAINNAME"
|
|
|
|
fi
|
|
|
|
|
2020-11-23 04:14:59 +09:00
|
|
|
# Run services
|
|
|
|
s6-svscan /etc/service
|