We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0bcbec commit 662f5dbCopy full SHA for 662f5db
1 file changed
entrypoint.sh
@@ -28,8 +28,19 @@ write_dma_auth () {
28
29
if [ -n "${AUTH_CONTENTS:+1}" ]; then
30
printenv AUTH_CONTENTS > /etc/dma/auth.conf
31
- elif [ -n "${AUTH_PASS:+1}" ]; then
32
- echo "${AUTH_USER:?}|${AUTH_HOST:-$DMA_SMARTHOST}:${AUTH_PASS}" > /etc/dma/auth.conf
+ elif [ -n "${AUTH_PASS:+1}${AUTH_PASS_FILE:+1}" ]; then
+ {
33
+ printf '%s|%s:' "${AUTH_USER:?}" "${AUTH_HOST:-$DMA_SMARTHOST}"
34
+ if [ -n "${AUTH_PASS_FILE-}" ]; then
35
36
+ cat "$AUTH_PASS_FILE"
37
+ # make sure there's a newline
38
+ echo
39
+ } | head -n 1
40
+ else
41
+ printenv AUTH_PASS
42
+ fi
43
+ } > /etc/dma/auth.conf
44
else
45
return 0
46
fi
0 commit comments