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,10 +479,18 @@ function create_letsencrypt {
fi fi
if [ ! -d /var/www/${new_domain} ]; then if [ ! -d /var/www/${new_domain} ]; then
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" \ dialog --title $"Create a new Let's Encrypt certificate" \
--msgbox $'Domain not found within /var/www' 6 40 --msgbox $'Domain not found within /var/www' 6 40
return return
fi fi
fi
${PROJECT_NAME}-addcert -e $new_domain -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH ${PROJECT_NAME}-addcert -e $new_domain -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH