You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
450 B
19 lines
450 B
#!/bin/bash
|
|
|
|
# Generate config
|
|
if [ ! -f /haraka/config/smtp.ini ]; then
|
|
haraka -i /haraka
|
|
fi
|
|
|
|
# Specify hostname
|
|
echo $HOSTNAME > /haraka/config/me
|
|
|
|
# Get and install certificates from Let's Encrypt
|
|
certbot certonly -n --agree-tos -d "$HOSTNAME"
|
|
mkdir -p /haraka/config/tls
|
|
cd /haraka/config/tls
|
|
ln -s /etc/letsencrypt/live/$HOSTNAME/privkey.pem tls-key.pem
|
|
ln -s /etc/letsencrypt/live/$HOSTNAME/fullchain.pem tls-cert.pem
|
|
cd -
|
|
|
|
haraka -c /haraka
|
|
|