Fix appends

This commit is contained in:
Bob Mottram 2016-11-16 19:58:30 +00:00
parent feccf85967
commit ef390c91bf
1 changed files with 2 additions and 14 deletions

View File

@ -356,20 +356,8 @@ function install_radicale {
else else
# alter the existing site config # alter the existing site config
if ! grep "radicale" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}; then if ! grep "radicale" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}; then
sed -i '@443@a sed -i '/443/a location \/radicale {\n auth_basic "Radicale";\n auth_basic_user_file \/var\/www\/radicale\/users;\n proxy_pass http://127.0.0.1:52322;\n }' /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
location /radicale { sed -i '/listen 127.0.0.1/a location \/radicale {\n auth_basic "Radicale";\n auth_basic_user_file \/var\/www\/radicale\/users;\n proxy_pass http://127.0.0.1:52322;\n }' /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
auth_basic "Radicale";
auth_basic_user_file /var/www/radicale/users;
proxy_pass http://127.0.0.1:52322;
}
' /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
sed -i '@listen 127.0.0.1@a
location /radicale {
auth_basic "Radicale";
auth_basic_user_file /var/www/radicale/users;
proxy_pass http://127.0.0.1:52322;
}
' /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
fi fi
fi fi