[DRE-commits] [diaspora-installer] 08/15: use diaspora as name for nginx conf file
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Tue Sep 27 13:55:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository diaspora-installer.
commit 3d727efaedf9518368d887659ea9774584a5feb9
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Tue Sep 27 17:12:42 2016 +0530
use diaspora as name for nginx conf file
---
debian/changelog | 1 +
set-env-nginx.sh | 32 +++++++++++++-------------------
2 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 18d6b25..361f330 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ diaspora-installer (0.6.0.0+debian3) UNRELEASED; urgency=medium
* Fix SERVERNAME variable creation
* Remove database.yml on purge
* Remove leftover files on uninstallation/purge
+ * Use /etc/nginx/sites-available/diaspora as nginx conf file
-- Pirate Praveen <praveen at debian.org> Tue, 27 Sep 2016 09:15:31 +0530
diff --git a/set-env-nginx.sh b/set-env-nginx.sh
index b5d3df8..87aaee7 100755
--- a/set-env-nginx.sh
+++ b/set-env-nginx.sh
@@ -8,22 +8,16 @@ fi
# Read configuration values
. /etc/diaspora/diaspora-common.conf
-if ! grep SERVERNAME ${diaspora_conf_private}
- then
- echo export SERVERNAME=$1 >> ${diaspora_conf_private}
- export SERVERNAME=$1
- echo export ENVIRONMENT_URL=https://$SERVERNAME >> ${diaspora_conf_private}
- export ENVIRONMENT_URL=https://$SERVERNAME
- if test -f ${nginx_conf_example}
- then
- sed -e "s/SERVERNAME_FIXME/$1/"\
- -e "s/DIASPORA_SSL_PATH_FIXME/\\/etc\\/diaspora/"\
- -e "s/DIASPORA_ROOT_FIXME/\\/usr\\/share\\/diaspora/"\
- ${nginx_conf_example} >/etc/nginx/sites-available/$1
- ln -fs /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/
- else
- echo "nginx.conf.example not found"
- exit 1
- fi
-fi
-
+if test -f /etc/nginx/sites-available/diaspora; then
+ echo "/etc/nginx/sites-available/diaspora already exist, skipping nginx configuration..."
+else
+ if test -f ${nginx_conf_example}; then
+ sed -e "s/SERVERNAME_FIXME/$1/" -e "s/DIASPORA_SSL_PATH_FIXME/\\/etc\\/diaspora/"\
+ -e "s/DIASPORA_ROOT_FIXME/\\/usr\\/share\\/diaspora/"\
+ ${nginx_conf_example} >/etc/nginx/sites-available/diaspora
+ ln -fs /etc/nginx/sites-available/diaspora /etc/nginx/sites-enabled/
+ else
+ echo "nginx.conf.example not found"
+ exit 1
+ fi
+fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/diaspora-installer.git
More information about the Pkg-ruby-extras-commits
mailing list