Skip to content

Commit

Permalink
Merge branch '5-troubleshooting' into 'master'
Browse files Browse the repository at this point in the history
#5: Add debug

See merge request ix.ai/smtp!10
  • Loading branch information
tlex committed Sep 28, 2021
2 parents 13b2c01 + 497f9b1 commit d957052
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
10 changes: 8 additions & 2 deletions set-exim4-update-conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions update-exim4.conf.debug
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d957052

Please sign in to comment.