From cebd21597046d43049abbfa139555f7fabf7e987 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 15 Nov 2016 20:33:00 +0000 Subject: [PATCH] radicale private cert --- src/freedombone-app-radicale | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/freedombone-app-radicale b/src/freedombone-app-radicale index 0928b695..6fecbeb5 100755 --- a/src/freedombone-app-radicale +++ b/src/freedombone-app-radicale @@ -337,8 +337,11 @@ function install_radicale { echo ' }' >> /etc/nginx/sites-available/radicale echo '}' >> /etc/nginx/sites-available/radicale - sed -i "s|radicale.crt|${DEFAULT_DOMAIN_NAME}.crt|g" /etc/nginx/sites-available/radicale - sed -i "s|radicale.pem|${DEFAULT_DOMAIN_NAME}.pem|g" /etc/nginx/sites-available/radicale + if [ -f /etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.pem ]; then + sed -i "s|radicale.crt|${DEFAULT_DOMAIN_NAME}.pem|g" /etc/nginx/sites-available/radicale + sed -i "s|radicale.pem|${DEFAULT_DOMAIN_NAME}.pem|g" /etc/nginx/sites-available/radicale + fi + sed -i "s|radicale.key|${DEFAULT_DOMAIN_NAME}.key|g" /etc/nginx/sites-available/radicale sed -i "s|radicale.dhparam|${DEFAULT_DOMAIN_NAME}.dhparam|g" /etc/nginx/sites-available/radicale # create a certificate