mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-12-27 19:41:40 +00:00
transmission startup handles setting.json, and possible to have transmission data-dir on mounted volume for persistent state
This commit is contained in:
parent
d129497ca5
commit
629e8d0fac
@ -20,7 +20,7 @@ RUN apt-get update \
|
||||
ADD piaconfig/* /etc/openvpn/
|
||||
ADD piaconfig/ca.crt /etc/openvpn/ca.crt
|
||||
ADD piaconfig/crl.pem /etc/openvpn/crl.pem
|
||||
ADD transmission/defaultSettings.json /etc/transmission-daemon/settings.json
|
||||
ADD transmission/defaultSettings.tmpl /etc/transmission-daemon/settings.tmpl
|
||||
ADD transmission/updateTransmissionPort.sh /etc/transmission-daemon/updatePort.sh
|
||||
ADD transmission/periodicUpdates.sh /etc/transmission-daemon/periodicUpdates.sh
|
||||
ADD transmission/run.sh /etc/transmission-daemon/start.sh
|
||||
|
@ -34,8 +34,4 @@ else
|
||||
echo $PIA_PASSWORD >> /config/pia-credentials.txt
|
||||
fi
|
||||
|
||||
dockerize \
|
||||
-template /etc/transmission-daemon/settings.json:/etc/transmission-daemon/settings.json \
|
||||
true
|
||||
|
||||
exec openvpn --config "$OPEN_VPN_CONFIG"
|
||||
|
@ -1,11 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f /config/transmission/settings.json ];
|
||||
if [ ! -z "${KEEP_TRANSMISSION_STATE}" ]
|
||||
then
|
||||
echo "STARTING TRANSMISSION: Using custom config directory /config/transmission"
|
||||
exec /usr/bin/transmission-daemon -g /config/transmission/ &
|
||||
echo "STARTING TRANSMISSION: Using transmission-data subdirectory to your /data mount point to store state."
|
||||
|
||||
# Initialize settings from environment variables
|
||||
dockerize -template /etc/transmission-daemon/settings.tmpl:/data/transmission-data/settings.json \
|
||||
true
|
||||
|
||||
exec /usr/bin/transmission-daemon -g /data/transmission-data/ &
|
||||
else
|
||||
echo "STARTING TRANSMISSION: No configuration provided, using defaults"
|
||||
echo "STARTING TRANSMISSION: Storing state in container only."
|
||||
|
||||
# Initialize settings from environment variables
|
||||
dockerize -template /etc/transmission-daemon/settings.tmpl:/etc/transmission-daemon/settings.json \
|
||||
true
|
||||
|
||||
exec /usr/bin/transmission-daemon -g /etc/transmission-daemon/ &
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user