[DRE-commits] [diaspora-installer] 09/09: add ENVIRONMENT_URL to config file
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Thu Apr 27 09:13:09 UTC 2017
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository diaspora-installer.
commit a4a20bb44170b1eb73687454a30e5e176f459559
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Thu Apr 27 14:42:28 2017 +0530
add ENVIRONMENT_URL to config file
---
debian/diaspora-common.postinst | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/debian/diaspora-common.postinst b/debian/diaspora-common.postinst
index a5f0482..b5cc8a9 100755
--- a/debian/diaspora-common.postinst
+++ b/debian/diaspora-common.postinst
@@ -67,9 +67,9 @@ case "$1" in
SERVERNAME=${RET}
db_get diaspora-common/ssl
diaspora_https=$RET
- ENVIRONMENT_URL=https://$SERVERNAME
+ ENVIRONMENT_URL="https:\/\/$SERVERNAME"
if [ "$diaspora_https" = "false" ]; then
- ENVIRONMENT_URL=http://$SERVERNAME
+ ENVIRONMENT_URL="http:\/\/$SERVERNAME"
fi
db_get diaspora-common/letsencrypt
diaspora_letsencrypt=$RET
@@ -80,6 +80,8 @@ case "$1" in
# them via debconf, (re-)add them to the conffile.
test -z "$SERVERNAME" || grep -Eq '^ *SERVERNAME=' ${diaspora_conf_private} || \
echo "SERVERNAME=" >> ${diaspora_conf_private}
+ test -z "$ENVIRONMENT_URL" || grep -Eq '^ *ENVIRONMENT_URL=' ${diaspora_conf_private} || \
+ echo "ENVIRONMENT_URL=" >> ${diaspora_conf_private}
test -z "$diaspora_https" || grep -Eq '^ *diaspora_https=' ${diaspora_conf_private} || \
echo "diaspora_https=" >> ${diaspora_conf_private}
test -z "$diaspora_letsencrypt" || grep -Eq '^ *diaspora_letsencrypt=' ${diaspora_conf_private} || \
@@ -87,6 +89,7 @@ case "$1" in
test -z "$diaspora_letsencrypt_email" || grep -Eq '^ *diaspora_letsencrypt_email=' ${diaspora_conf_private} || \
echo "diaspora_letsencrypt_email=" >> ${diaspora_conf_private}
sed -e "s/^ *SERVERNAME=.*/SERVERNAME=\"$SERVERNAME\"/" \
+ -e "s/^ *ENVIRONMENT_URL=.*/ENVIRONMENT_URL=\"$ENVIRONMENT_URL\"/" \
-e "s/^ *diaspora_https=.*/diaspora_https=\"$diaspora_https\"/" \
-e "s/^ *diaspora_letsencrypt=.*/diaspora_letsencrypt=\"$diaspora_letsencrypt\"/" \
-e "s/^ *diaspora_letsencrypt_email=.*/diaspora_letsencrypt_email=\"$diaspora_letsencrypt_email\"/" \
--
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