diff --git a/Dockerfile b/Dockerfile index 714aa75..e360ad6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN mkdir -p /bin/ /config/ /data/ && \ apk update -U --no-cache transmission-daemon COPY ./bin/. /usr/local/bin/ -COPY ./config/. /config/ +COPY ./config/. /etc/ COPY ./data/. /data/ FROM scratch diff --git a/bin/entrypoint-transmission.sh b/bin/entrypoint-transmission.sh index 6162b61..878d51f 100755 --- a/bin/entrypoint-transmission.sh +++ b/bin/entrypoint-transmission.sh @@ -94,7 +94,11 @@ fi [ -f "/etc/.env.sh" ] && rm -Rf "/etc/.env.sh" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Additional commands - +if [ -f "/config/transmission/settings.json" ]; then + cp -Rf "/config/transmission/settings.json" "/etc/transmission/settings.json" +else + cp -Rf "/etc/transmission/settings.json" "/config/transmission/settings.json" +fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case "$1" in --help) # Help message @@ -118,7 +122,7 @@ healthcheck) # Docker healthcheck *) # Execute primary command if [ $# -eq 0 ]; then - transmission-daemon --config-dir /config/transmission -f + transmission-daemon --config-dir /etc/transmission -f else __exec_bash "/bin/bash" fi