fix issue causing incorrect config in Docker (#10595)

Previously, when the Docker entrypoint script generated the config
files, it would append the configuration without including a newline.
This could result in incorrect configuration. This has been fixed by
always appending a newline before any configuration.

Co-authored-by: Bryson Chen <brysonjackychen@gmail.com>

Co-authored-by: Bryson Chen <brysonjackychen@gmail.com>
This commit is contained in:
David Palmer 2020-11-21 11:52:38 +13:00 committed by GitHub
parent 2201ffa2f0
commit 3cafd531de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -71,8 +71,8 @@ setKey() {
# Delete from all
sed -ri "/$key=/d" $COMMON_CONF_DIR/common.runtime.properties
[ -f $service_conf ] && sed -ri "/$key=/d" $service_conf
[ -f $service_conf ] && echo "$key=$value" >>$service_conf
[ -f $service_conf ] || echo "$key=$value" >>$COMMON_CONF_DIR/common.runtime.properties
[ -f $service_conf ] && echo -e "\n$key=$value" >>$service_conf
[ -f $service_conf ] || echo -e "\n$key=$value" >>$COMMON_CONF_DIR/common.runtime.properties
echo "Setting $key=$value in $service_conf"
}