Commit 05421d65 authored by Praveen Arimbrathodiyil's avatar Praveen Arimbrathodiyil
Browse files

always write nginx conf to support reconfigure

parent 97d673bb
......@@ -14,18 +14,14 @@ fi
. /etc/diaspora/diaspora-common.conf
nginx_site_private=/var/lib/diaspora-common/nginx-site-diaspora
if test -f /etc/nginx/sites-available/diaspora; then
echo "/etc/nginx/sites-available/diaspora already exist, skipping nginx configuration..."
if test -f ${nginx_site_example}; then
sed -e "s/SERVERNAME_FIXME/$1/g" -e "s/DIASPORA_SSL_PATH_FIXME/\\/etc\\/diaspora/"\
-e "s/DIASPORA_ROOT_FIXME/\\/usr\\/share\\/diaspora/"\
${nginx_site_example} > ${nginx_site_private}
ucf --debconf-ok --three-way ${nginx_site_private} /etc/nginx/sites-available/diaspora
ln -fs /etc/nginx/sites-available/diaspora /etc/nginx/sites-enabled/
ucfr diaspora-common /etc/nginx/sites-available/diaspora
else
if test -f ${nginx_site_example}; then
sed -e "s/SERVERNAME_FIXME/$1/g" -e "s/DIASPORA_SSL_PATH_FIXME/\\/etc\\/diaspora/"\
-e "s/DIASPORA_ROOT_FIXME/\\/usr\\/share\\/diaspora/"\
${nginx_site_example} > ${nginx_site_private}
ucf --debconf-ok --three-way ${nginx_site_private} /etc/nginx/sites-available/diaspora
ln -fs /etc/nginx/sites-available/diaspora /etc/nginx/sites-enabled/
ucfr diaspora-common /etc/nginx/sites-available/diaspora
else
echo "nginx.conf.example not found"
exit 1
fi
fi
echo "nginx.conf.example not found"
exit 1
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment