generate paths from CertbotDomain

This commit is contained in:
Asif Bacchus 2019-01-04 23:32:56 -07:00
parent c93d5ac9c5
commit 2c4a74bc60

View File

@ -22,6 +22,7 @@ unset useCertbot
unset CertbotDomain unset CertbotDomain
unset CertPath unset CertPath
unset KeyPath unset KeyPath
unset CAChain
unset DHPath unset DHPath
detectedIP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p') detectedIP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')
@ -113,6 +114,13 @@ if [ "${useCertbot}" -eq 1 ]; then
done done
fi fi
# Generate paths from CertbotDomain
if [ "${useCertbot}" -eq 1 ]; then
CertPath="/etc/letsencrypt/live/${CertbotDomain}/fullchain.pem"
KeyPath="/etc/letsencrypt/live/${CertbotDomain}/privkey.pem"
CAChain="/etc/letsencrypt/live/${CertbotDomain}/chain.pem"
fi
# only process manual certificate paths if NOT using Certbot # only process manual certificate paths if NOT using Certbot
if [ "${useCertbot}" -eq 0 ]; then if [ "${useCertbot}" -eq 0 ]; then
# not using Certbot: get location of certificate # not using Certbot: get location of certificate