1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-22 05:42:54 +00:00

Cure some quoting issues

* Double quotes not needed by docker compose

Same issue as here https://github.com/zokradonh/kopano-docker/issues/216

* move deletion of tmpfile into an exit trap

otherwise the file is not cleaned up when supported images are built

* repair sourcing of env by removing kopano ldap settings from env before sourcing

* additional packages env vars should be quoted in .env
* adapt start scripts to handle quotes additional packages
* treat update-tag script with ldap variable fix from setup.sh

fixes #216

* run version.sh in travis (to fail early if something is wrong there)
commit forgotten fixes to start scripts
This commit is contained in:
zokradonh
2019-08-22 09:21:10 +02:00
committed by Felix Bartels
parent b8885da14e
commit b0236bf0d8
8 changed files with 29 additions and 16 deletions
+9 -4
View File
@@ -3,6 +3,13 @@
set -euo pipefail
IFS=$'\n\t'
function finish {
if [ -e "$tmpfile" ]; then
rm "$tmpfile"
fi
}
trap finish EXIT
if ! command -v reg > /dev/null; then
echo "Please install reg in order to run this script."
exit 1
@@ -19,6 +26,8 @@ tmpfile=$(mktemp /tmp/kopano-docker-env.XXXXXX)
cp ./.env "$tmpfile"
sed -i '/LDAP_QUERY_FILTER/s/^/#/g' "$tmpfile"
sed -i '/SASLAUTHD_LDAP_FILTER/s/^/#/g' "$tmpfile"
sed -i '/KCUNCOMMENT_LDAP_1/s/^/#/g' "$tmpfile"
sed -i '/KCCOMMENT_LDAP_1/s/^/#/g' "$tmpfile"
# shellcheck disable=SC1090
source "$tmpfile"
@@ -112,7 +121,3 @@ update_env_file SSL_VERSION "$return_value"
tag_question kopano_ldap "${LDAP_VERSION:-latest}" "LDAP container"
update_env_file LDAP_VERSION "$return_value"
if [ -e "$tmpfile" ]; then
rm "$tmpfile"
fi