From c1e5672df1eaa1909041a3f52e07e627bf60ee61 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 11 May 2017 16:16:53 +0100 Subject: [PATCH] nginx check for radicale --- src/freedombone-app-radicale | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-app-radicale b/src/freedombone-app-radicale index 25d04edd..67fc6c8d 100755 --- a/src/freedombone-app-radicale +++ b/src/freedombone-app-radicale @@ -513,7 +513,7 @@ function install_radicale { set_completion_param "radicale onion domain" "${RADICALE_ONION_HOSTNAME}" else # alter the existing site config - if ! grep "radicale" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}; then + if ! grep "# Start radicale" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}; then sed -i '/ 443/a # Start radicale\n location @radicale {\n auth_basic "Radicale";\n auth_basic_user_file /var/www/radicale/users;\n proxy_pass http://localhost:52322;\n proxy_buffering off;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n }\n\n location /radicale {\n try_files $uri @radicale;\n }\n\n location /.well-known/carddav {\n try_files $uri @radicale;\n }\n\n location /.well-known/caldav {\n try_files $uri @radicale;\n }\n # End radicale' /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME} sed -i '/listen localhost/a # Start radicale\n location @radicale {\n auth_basic "Radicale";\n auth_basic_user_file /var/www/radicale/users;\n proxy_pass http://localhost:52322;\n proxy_buffering off;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n }\n\n location /radicale {\n try_files $uri @radicale;\n }\n\n location /.well-known/carddav {\n try_files $uri @radicale;\n }\n\n location /.well-known/caldav {\n try_files $uri @radicale;\n }\n # End radicale' /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME} fi