From a46a84a94963c701649882135d3854d44b3605b3 Mon Sep 17 00:00:00 2001 From: andryyy Date: Sun, 14 May 2017 14:26:07 +0200 Subject: [PATCH] Fix docker-entrypoint, fixes key merging from file to Redis --- data/Dockerfiles/php-fpm/docker-entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/Dockerfiles/php-fpm/docker-entrypoint.sh b/data/Dockerfiles/php-fpm/docker-entrypoint.sh index 1e4d3fe6..591f6568 100755 --- a/data/Dockerfiles/php-fpm/docker-entrypoint.sh +++ b/data/Dockerfiles/php-fpm/docker-entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -if [[ ! -d "/data/dkim/txt" || ! -d "/data/dkim/keys" ]] ; then mkdir -p /data/dkim/{txt,keys} ; chown -R www-data:www-data /data/dkim; fi +if [[ ! -d "/data/dkim/txt" || ! -d "/data/dkim/keys" ]] ; then mkdir -p /data/dkim/{txt,keys} ; chown -R www-data:www-data /data/dkim; fi if [[ $(stat -c %U /data/dkim/) != "www-data" ]] ; then chown -R www-data:www-data /data/dkim ; fi # Wait for containers @@ -50,7 +50,7 @@ fi for file in $(ls /data/dkim/keys/); do domain=${file%.dkim} if [[ -f /data/dkim/txt/${file} ]]; then - redis-cli -h redis-mailcow HSET DKIM_PUB_KEYS "${domain}" "$(cat /data/dkim/keys/${domain})" + redis-cli -h redis-mailcow HSET DKIM_PUB_KEYS "${domain}" "$(cat /data/dkim/txt/${file})" redis-cli -h redis-mailcow HSET DKIM_PRIV_KEYS "${domain}" "$(cat /data/dkim/keys/${file})" redis-cli -h redis-mailcow HSET DKIM_SELECTORS "${domain}" "dkim.${domain}" fi