21 lines
424 B
Bash
21 lines
424 B
Bash
#!/bin/sh
|
|
|
|
printf "Domain root: "
|
|
read -r domain_root
|
|
printf "Subdomain (can be empty): "
|
|
read -r sub_domain
|
|
|
|
if [ -z "$sub_domain" ]
|
|
then
|
|
domain="${domain_root}"
|
|
else
|
|
domain="${sub_domain}.${domain_root}"
|
|
fi
|
|
|
|
cat > ./docker/mail/mail.env <<EOF
|
|
#!/bin/sh
|
|
DOMAINNAME=${domain_root}
|
|
MAILNAME=${domain}
|
|
SSL_CERT=/etc/letsencrypt/live/${domain_root}/fullchain.pem
|
|
SSL_KEY=/etc/letsencrypt/live/${domain_root}/privkey.pem
|
|
EOF |