Skip to content

Commit

Permalink
Mount point changed to /config
Browse files Browse the repository at this point in the history
  • Loading branch information
pkishino committed Sep 29, 2021
1 parent 502ca0a commit 42da954
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ENV OPENVPN_USERNAME=**None** \
OPENVPN_PASSWORD=**None** \
OPENVPN_PROVIDER=**None** \
GLOBAL_APPLY_PERMISSIONS=true \
TRANSMISSION_HOME=/data/transmission-home \
TRANSMISSION_HOME=/config/transmission-home \
TRANSMISSION_RPC_PORT=9091 \
TRANSMISSION_DOWNLOAD_DIR=/data/completed \
TRANSMISSION_INCOMPLETE_DIR=/data/incomplete \
Expand Down
4 changes: 2 additions & 2 deletions docs/config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ In previous versions of this container the settings were not persistent but was
This had the benefit of being very explicit and reproducable but you had to provide Transmission config as environment variables if you
wanted them to stay that way between container restarts. This felt cumbersome to many.

As of version 3.0 this is no longer true. Settings are now persisted in the `/data/transmission-home` folder in the container and as
long as you mount `/data` you should be able to configure Transmission using the UI as you normally would.
As of version 3.0 this is no longer true. Settings are now persisted in the `/config/transmission-home` folder in the container and as
long as you mount `/config` you should be able to configure Transmission using the UI as you normally would.

You may still override Transmission options by setting environment variables if that's your thing.
The variables are named after the transmission config they target but are prefixed with `TRANSMISSION_`, capitalized, and `-` is converted to `_`.
Expand Down
4 changes: 2 additions & 2 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
## How do I enable authentication in the web ui

You can do this either by setting the appropriate fields in `settings.json` which is
found in TRANSMISSION_HOME which defaults to `/data/transmission-home` so it will be available
on your host where you mount the `/data` volume. Remember that Transmission overwrites the config
found in TRANSMISSION_HOME which defaults to `/config/transmission-home` so it will be available
on your host where you mount the `/config` volume. Remember that Transmission overwrites the config
when it shuts down, so do this when the container is not running.

Or you can set it using the convenience environment variables. They will then override the settings
Expand Down
14 changes: 8 additions & 6 deletions transmission/userSetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@ if [ -n "$PUID" ] && [ ! "$(id -u root)" -eq "$PUID" ]; then
chown ${RUN_AS}:${RUN_AS} /dev/stdout
fi

if [[ "${TRANSMISSION_HOME%/*}" != "/config" ]]; then
echo "WARNING: TRANSMISSION_HOME mountpoint is not on default /config, this is not recommended."
fi

# Make sure directories exist before chown and chmod
mkdir -p /config \
"${TRANSMISSION_HOME}" \
"${TRANSMISSION_DOWNLOAD_DIR}" \
"${TRANSMISSION_INCOMPLETE_DIR}" \
"${TRANSMISSION_WATCH_DIR}"

echo "Enforcing ownership on transmission config directories"
echo "Enforcing ownership on transmission config directory"
chown -R ${RUN_AS}:${RUN_AS} \
/config \
"${TRANSMISSION_HOME}"
/config

echo "Applying permissions to transmission config directories"
echo "Applying permissions to transmission config directory"
chmod -R go=rX,u=rwX \
/config \
"${TRANSMISSION_HOME}"
/config

if [ "$GLOBAL_APPLY_PERMISSIONS" = true ] ; then
echo "Setting owner for transmission paths to ${PUID}:${PGID}"
Expand Down

0 comments on commit 42da954

Please sign in to comment.