From 63d55910678fc2e8bb4cc0035f02f8b57b2b537e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 8 Nov 2016 22:20:32 +0000 Subject: [PATCH] Allow certs to be issued on the default domain for radicale --- src/freedombone-sec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/freedombone-sec b/src/freedombone-sec index ad91a601..ae99ab09 100755 --- a/src/freedombone-sec +++ b/src/freedombone-sec @@ -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