diff --git a/Dockerfile b/Dockerfile index ec8d87e..df358d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ ENV PORT=${PORT} BIND_IP=${BIND_IP} BIND_IP6=${BIND_IP6} EXPOSE ${PORT} -COPY entrypoint.sh set-exim4-update-conf /bin/ +COPY entrypoint.sh set-exim4-update-conf update-exim4.conf.debug /bin/ ENTRYPOINT ["/bin/entrypoint.sh"] CMD ["exim", "-bd", "-q15m", "-v"] diff --git a/set-exim4-update-conf b/set-exim4-update-conf index 534b0d5..c00019e 100755 --- a/set-exim4-update-conf +++ b/set-exim4-update-conf @@ -18,6 +18,12 @@ while [ $# -gt 0 ]; do sedExpr+=$'\n\t'"s/^#?(${key})=.*/\1='${sed_escaped_value}'/;" done -set -x +### Debug ### +if [ "${VERBOSE:-false}" == "true" ] ; then + echo "Running as user '$(whoami)'" + set -x + mount | grep -vE "sys|proc|devpts|mqueue|tmpfs" +fi + sed -ri "$sedExpr"$'\n' "$conf" -update-exim4.conf -v +update-exim4.conf.debug diff --git a/update-exim4.conf.debug b/update-exim4.conf.debug new file mode 100755 index 0000000..67faa1c --- /dev/null +++ b/update-exim4.conf.debug @@ -0,0 +1,10 @@ +#!/bin/sh +# update-exim4.conf.debug - Enable full verbosity in /usr/sbin/update-exim4.conf + +if [ "${VERBOSE:-false}" = "true" ]; then + set -x + . /usr/sbin/update-exim4.conf +else + exec /usr/sbin/update-exim4.conf -v +fi +