Allow certs to be issued on the default domain for radicale

This commit is contained in:
Bob Mottram 2016-11-08 22:20:32 +00:00
parent 21233d37e3
commit 63d5591067
1 changed files with 11 additions and 3 deletions

View File

@ -479,9 +479,17 @@ function create_letsencrypt {
fi
if [ ! -d /var/www/${new_domain} ]; then
dialog --title $"Create a new Let's Encrypt certificate" \
--msgbox $'Domain not found within /var/www' 6 40
return
domain_found=
if [ -f /etc/nginx/sites-available/radicale ]; then
if grep "${new_domain}" /etc/nginx/sites-available/radicale; then
domain_found=1
fi
fi
if [ ! $domain_found ]; then
dialog --title $"Create a new Let's Encrypt certificate" \
--msgbox $'Domain not found within /var/www' 6 40
return
fi
fi
${PROJECT_NAME}-addcert -e $new_domain -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH