fixed docker entrypoint bash
This commit is contained in:
parent
4c1557d53a
commit
708d6fecc6
1 changed files with 10 additions and 5 deletions
|
@ -1,7 +1,12 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
[[ -n "$ZEITDL_UID" || -n "$ZEITDL_GID" ]] && chown_arg='-q'
|
||||
if out=$(python ./zeit-dl "$ZEITDL_USER" "$ZEITDL_PASSWORD" ${ZEITDL_OPTIONS:=-o /data} $chown_arg); then
|
||||
[[ -n "$ZEITDL_UID" ]] && chown $ZEITDL_UID "$out"
|
||||
[[ -n "$ZEITDL_GID" ]] && chgrp $ZEITDL_GID "$out"
|
||||
if [[ -n "$ZEITDL_UID" || -n "$ZEITDL_GID" ]]; then
|
||||
echo "Running zeit-dl with --quiet to get output path for chown/chgrp..."
|
||||
out=$(python ./zeit-dl "$ZEITDL_USER" "$ZEITDL_PASSWORD" ${ZEITDL_OPTIONS:=-o /data} --quiet)
|
||||
if [[ -n "$out" ]]; then
|
||||
[[ -n "$ZEITDL_UID" ]] && chown $ZEITDL_UID "$out"
|
||||
[[ -n "$ZEITDL_GID" ]] && chgrp $ZEITDL_GID "$out"
|
||||
fi
|
||||
else
|
||||
python ./zeit-dl "$ZEITDL_USER" "$ZEITDL_PASSWORD" ${ZEITDL_OPTIONS:=-o /data}
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue