[DRE-commits] [diaspora-installer] 02/03: correctly disable ssl with variable
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Fri Apr 28 09:33:19 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 355170cae95b95ed1939b9ca93e614067d371e6a
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Fri Apr 28 14:56:13 2017 +0530
correctly disable ssl with variable
---
debian/diaspora-common.config | 2 +-
debian/diaspora-common.postinst | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/debian/diaspora-common.config b/debian/diaspora-common.config
index 2bd17ae..0938384 100644
--- a/debian/diaspora-common.config
+++ b/debian/diaspora-common.config
@@ -16,7 +16,7 @@ set -e
# Store values from config file into
# debconf db.
db_set diaspora-common/url "$SERVERNAME"
- db_set diaspora-common/ssl "${diaspora_https:-true}"
+ db_set diaspora-common/ssl "${ENVIRONMENT_REQUIRE_SSL:-true}"
db_set diaspora-common/letsencrypt "${diaspora_letsencrypt:-false}"
if [ -n "$diaspora_letsencrypt_email" ]; then
db_set diaspora-common/letsencrypt_email "${diaspora_letsencrypt_email}"
diff --git a/debian/diaspora-common.postinst b/debian/diaspora-common.postinst
index b5cc8a9..ae7e06b 100755
--- a/debian/diaspora-common.postinst
+++ b/debian/diaspora-common.postinst
@@ -66,9 +66,9 @@ case "$1" in
db_get diaspora-common/url
SERVERNAME=${RET}
db_get diaspora-common/ssl
- diaspora_https=$RET
+ ENVIRONMENT_REQUIRE_SSL=$RET
ENVIRONMENT_URL="https:\/\/$SERVERNAME"
- if [ "$diaspora_https" = "false" ]; then
+ if [ "$ENVIRONMENT_REQUIRE_SSL" = "false" ]; then
ENVIRONMENT_URL="http:\/\/$SERVERNAME"
fi
db_get diaspora-common/letsencrypt
@@ -82,15 +82,15 @@ case "$1" in
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 "$ENVIRONMENT_REQUIRE_SSL" || grep -Eq '^ *ENVIRONMENT_REQUIRE_SSL=' ${diaspora_conf_private} || \
+ echo "ENVIRONMENT_REQUIRE_SSL=" >> ${diaspora_conf_private}
test -z "$diaspora_letsencrypt" || grep -Eq '^ *diaspora_letsencrypt=' ${diaspora_conf_private} || \
echo "diaspora_letsencrypt=" >> ${diaspora_conf_private}
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/^ *ENVIRONMENT_REQUIRE_SSL=.*/ENVIRONMENT_REQUIRE_SSL=\"$ENVIRONMENT_REQUIRE_SSL\"/" \
-e "s/^ *diaspora_letsencrypt=.*/diaspora_letsencrypt=\"$diaspora_letsencrypt\"/" \
-e "s/^ *diaspora_letsencrypt_email=.*/diaspora_letsencrypt_email=\"$diaspora_letsencrypt_email\"/" \
< ${diaspora_conf_private} > ${diaspora_conf_private}.tmp
--
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