Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
rajudev
diaspora-installer
Commits
208ef43f
Commit
208ef43f
authored
Apr 26, 2017
by
Praveen Arimbrathodiyil
Browse files
update config in case value changed
parent
ca811126
Changes
1
Hide whitespace changes
Inline
Side-by-side
debian/diaspora-common.postinst
View file @
208ef43f
...
...
@@ -59,7 +59,29 @@ case "$1" in
cp
${
diaspora_conf_example
}
${
diaspora_conf_private
}
dbc_go diaspora-common
"
$@
"
cp
-a
-f
${
diaspora_conf_private
}
${
diaspora_conf_private
}
.tmp
# Read from debconf db
db_get diaspora-common/ssl
diaspora_https
=
$RET
db_get diaspora-common/letsencrypt
diaspora_letsencrypt
=
$RET
# If the admin deleted or commented some variables but then set
# 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
"
$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
}
||
\
echo
"diaspora_letsencrypt="
>>
${
diaspora_conf_private
}
sed
-e
"s/^ *SERVERNAME=.*/SERVERNAME=
\"
$SERVERNAME
\"
/"
\
-e
"s/^ *diaspora_https=.*/diaspora_https=
\"
$diaspora_https
\"
/"
\
-e
"s/^ *diaspora_letsencrypt=.*/diaspora_letsencrypt=
\"
$diaspora_letsencrypt
\"
/"
\
<
${
diaspora_conf_private
}
>
${
diaspora_conf_private
}
.tmp
mv
-f
${
diaspora_conf_private
}
.tmp
${
diaspora_conf_private
}
# Configure pod address.
db_get diaspora-common/url
export
SERVERNAME
=
${
RET
}
...
...
Write
Preview
Markdown
is supported
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