Skip to content

Commit 36e26a9

Browse files
committed
fix: set default command before handling dma conf
1 parent f54ff9f commit 36e26a9

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

entrypoint.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,18 @@ write_dma_auth () {
5252
${DMA_AUTHPATH="/etc/dma/auth.conf"}
5353
export DMA_SMARTHOST DMA_PORT DMA_AUTHPATH
5454

55+
# set default command
56+
[ "${1#-}" = "$1" ] || set -- msmtpd "$@"
57+
5558
write_dma_conf
5659
case "$1" in
5760
dma|mailq|msmtpd|newaliases|sendmail) verify_dma_conf ;;
5861
esac
5962

6063
write_dma_auth
6164

62-
if [ "$1" = "msmtpd" ] || [ "${1#-}" != "$1" ]; then
63-
[ "${1#-}" != "$1" ] || shift
65+
if [ "$1" = "msmtpd" ]; then
66+
shift
6467
set -- tini -- msmtpd \
6568
--interface 0.0.0.0 \
6669
--log /dev/stdout \

0 commit comments

Comments
 (0)