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