Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
rajudev
diaspora-installer
Commits
355170ca
Commit
355170ca
authored
Apr 28, 2017
by
Praveen Arimbrathodiyil
Browse files
correctly disable ssl with variable
parent
ac480ef8
Changes
2
Hide whitespace changes
Inline
Side-by-side
debian/diaspora-common.config
View file @
355170ca
...
...
@@ -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}"
...
...
debian/diaspora-common.postinst
View file @
355170ca
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment