Fix error "base64: invalid input" causing init container crash (#232)

* Fix error "base64: invalid input" causing init container crash

Fixes zammad/zammad-docker-compose#231

* Update containers/zammad/docker-entrypoint.sh

* Update containers/zammad/docker-entrypoint.sh

Co-authored-by: André Bauer <monotek@users.noreply.github.com>
This commit is contained in:
Arnaud Veron 2021-10-05 21:59:47 +02:00 committed by GitHub
parent 11db944a4d
commit b531521da8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,8 +71,9 @@ if [ "$1" = 'zammad-init' ]; then
bundle exec rake db:seed bundle exec rake db:seed
# create autowizard.json on first install # create autowizard.json on first install
if [ -n "${AUTOWIZARD_JSON}" ]; then if base64 -d <<< ${AUTOWIZARD_JSON} &>> /dev/null; then
echo "${AUTOWIZARD_JSON}" | base64 -d > auto_wizard.json echo "Saving autowizard json payload..."
base64 -d <<< "${AUTOWIZARD_JSON}" > auto_wizard.json
fi fi
else else
bundle exec rails r "Cache.clear" bundle exec rails r "Cache.clear"