From 956ee95f012a7dfe77a8d1ac23c4d3acda0d8238 Mon Sep 17 00:00:00 2001 From: Jay MOULIN Date: Sun, 28 Nov 2021 18:15:13 +0100 Subject: [PATCH] Adds ERROR_FILE docker env param --- docker/Dockerfile | 1 + docker/README.md | 5 ++--- docker/daemon.sh | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 64a9ca2..1af5f50 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,6 +13,7 @@ ENV REMOVE=0 ENV ONESHOT=0 ENV LISTENER_ONLY=0 ENV DEDUP_API='' +ENV ERROR_FILE='' RUN apk update && \ apk add gcc g++ linux-headers libxml2-dev libxslt-dev --no-cache --virtual .build-deps && \ diff --git a/docker/README.md b/docker/README.md index d02d182..04ad596 100644 --- a/docker/README.md +++ b/docker/README.md @@ -33,9 +33,8 @@ These environments variable will produce a different behaviour * `REMOVE` Remove file on a successful upload (boolean, (default: false)) - pass to true if you want to remove files * `ONESHOT` Execute only once without listening to folder events (boolean, (default: false)) - pass to true if you want to execute only once (also remove `--restart=always` from docker parameters) * `LISTENER_ONLY` Listener only, upload files only when added not at start (boolean, (default: false)) - pass to true if you want to listen -* `DEDUP_API` Url to the deduplicate API (string (default: None)) - Will call deduplicate API before trying to sample and upload to Google Music -* `LOGIN` Login (for cover art uploading) (string (default: None)) - Login of your Google Music account for cover art uploading -* `PASSWORD` Password (for cover art uploading) (string (default: None)) - Password of your Google Music account for cover art uploading +* `DEDUP_API` Url to the deduplicate API (string (default: None)) - Will call deduplicate API before trying to sample and upload to Youtube Music +* `ERROR_FILE` Path to logs (string (default: None)) - Will logs into the specified file - default stderr ### Example ``` diff --git a/docker/daemon.sh b/docker/daemon.sh index 9869207..633fcd7 100755 --- a/docker/daemon.sh +++ b/docker/daemon.sh @@ -22,6 +22,9 @@ else if [[ "$DEDUP_API" ]]; then PARAMS="$PARAMS -w $DEDUP_API" fi + if [[ "$ERROR_FILE" ]]; then + PARAMS="$PARAMS -e $ERROR_FILE" + fi youtube-music-upload -d /media/library -a /root/oauth/oauth.key $PARAMS & PID=$! wait $PID