Commit a4a20bb4 authored by Praveen Arimbrathodiyil's avatar Praveen Arimbrathodiyil
Browse files

add ENVIRONMENT_URL to config file

parent 67c7596b
......@@ -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\"/" \
......
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