forked from evilalmus/arlo-downloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
executable file
·34 lines (29 loc) · 1.03 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
set -xeu -o pipefail
# Allow to switch user in compose.yml
usermod -u $UID arlo-downloader
# shellcheck disable=2086 # passed from Dockerfile or compose
groupmod -g $GID arlo-downloader
# Chown, just in case
chown "$UID:$GID" /records /arlo-downloader/aarlo
if [[ "$DEBUG" != "3" ]]; then
set +x
echo "runuser -u arlo-downloader -- python /arlo-downloader/arlo-downloader.py \
--save-media-to \"${SAVE_MEDIA_TO}\" \
--tfa-type \"${TFA_TYPE}\" \
--tfa-source \"${TFA_SOURCE}\" \
--tfa-retries \"${TFA_RETRIES}\" \
--tfa-delay \"${TFA_DELAY}\" \
--tfa-host \"${TFA_HOST}\" \
--tfa-username \"${TFA_USERNAME}\" \
--tfa-password \"***\""
fi
runuser -u arlo-downloader -- python /arlo-downloader/arlo-downloader.py \
--save-media-to "${SAVE_MEDIA_TO}" \
--tfa-type "${TFA_TYPE}" \
--tfa-source "${TFA_SOURCE}" \
--tfa-retries "${TFA_RETRIES}" \
--tfa-delay "${TFA_DELAY}" \
--tfa-host "${TFA_HOST}" \
--tfa-username "${TFA_USERNAME}" \
--tfa-password "${TFA_PASSWORD}"