mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-11-23 11:04:56 +00:00
Merge pull request #25 from dougnukem/transmission-resume-torrent
This commit is contained in:
commit
cdc289545a
@ -95,6 +95,7 @@ ENV OPENVPN_USERNAME=**None** \
|
|||||||
"TRANSMISSION_UTP_ENABLED=true" \
|
"TRANSMISSION_UTP_ENABLED=true" \
|
||||||
"TRANSMISSION_WATCH_DIR=/data/watch" \
|
"TRANSMISSION_WATCH_DIR=/data/watch" \
|
||||||
"TRANSMISSION_WATCH_DIR_ENABLED=true" \
|
"TRANSMISSION_WATCH_DIR_ENABLED=true" \
|
||||||
|
"TRANSMISSION_HOME=/data/transmission-home" \
|
||||||
RESOLV_OVERRIDE=**None**
|
RESOLV_OVERRIDE=**None**
|
||||||
|
|
||||||
# Expose port and run
|
# Expose port and run
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
export TRANSMISSION_HOME={{ .Env.TRANSMISSION_HOME }}
|
||||||
export TRANSMISSION_ALT_SPEED_DOWN={{ .Env.TRANSMISSION_ALT_SPEED_DOWN }}
|
export TRANSMISSION_ALT_SPEED_DOWN={{ .Env.TRANSMISSION_ALT_SPEED_DOWN }}
|
||||||
export TRANSMISSION_ALT_SPEED_ENABLED={{ .Env.TRANSMISSION_ALT_SPEED_ENABLED }}
|
export TRANSMISSION_ALT_SPEED_ENABLED={{ .Env.TRANSMISSION_ALT_SPEED_ENABLED }}
|
||||||
export TRANSMISSION_ALT_SPEED_TIME_BEGIN={{ .Env.TRANSMISSION_ALT_SPEED_TIME_BEGIN }}
|
export TRANSMISSION_ALT_SPEED_TIME_BEGIN={{ .Env.TRANSMISSION_ALT_SPEED_TIME_BEGIN }}
|
||||||
|
@ -8,10 +8,12 @@ echo "Updating TRANSMISSION_BIND_ADDRESS_IPV4 to tun0 ip: ${tun0ip}"
|
|||||||
export TRANSMISSION_BIND_ADDRESS_IPV4=${tun0ip}
|
export TRANSMISSION_BIND_ADDRESS_IPV4=${tun0ip}
|
||||||
|
|
||||||
echo "Generating transmission settings.json from env variables"
|
echo "Generating transmission settings.json from env variables"
|
||||||
dockerize -template /etc/transmission/settings.tmpl:/etc/transmission-daemon/settings.json /bin/true
|
# Ensure TRANSMISSION_HOME is created
|
||||||
|
mkdir -p ${TRANSMISSION_HOME}
|
||||||
|
dockerize -template /etc/transmission/settings.tmpl:${TRANSMISSION_HOME}/settings.json /bin/true
|
||||||
|
|
||||||
echo "STARTING TRANSMISSION"
|
echo "STARTING TRANSMISSION"
|
||||||
exec /usr/bin/transmission-daemon -g /etc/transmission-daemon/ &
|
exec /usr/bin/transmission-daemon -g ${TRANSMISSION_HOME} &
|
||||||
|
|
||||||
if [ "$OPENVPN_PROVIDER" = "PIA" ]
|
if [ "$OPENVPN_PROVIDER" = "PIA" ]
|
||||||
then
|
then
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Source our persisted env variables from container startup
|
||||||
|
. /etc/transmission/environment-variables.sh
|
||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
PIA_PASSWD_FILE=/config/openvpn-credentials.txt
|
PIA_PASSWD_FILE=/config/openvpn-credentials.txt
|
||||||
TRANSMISSION_PASSWD_FILE=/config/transmission-credentials.txt
|
TRANSMISSION_PASSWD_FILE=/config/transmission-credentials.txt
|
||||||
@ -10,7 +13,7 @@ transmission_username=$(head -1 $TRANSMISSION_PASSWD_FILE)
|
|||||||
transmission_passwd=$(tail -1 $TRANSMISSION_PASSWD_FILE)
|
transmission_passwd=$(tail -1 $TRANSMISSION_PASSWD_FILE)
|
||||||
local_vpn_ip=$(ip addr show tun0 | grep inet | awk '{ print $2 }')
|
local_vpn_ip=$(ip addr show tun0 | grep inet | awk '{ print $2 }')
|
||||||
pia_client_id_file=/etc/transmission/pia_client_id
|
pia_client_id_file=/etc/transmission/pia_client_id
|
||||||
transmission_settings_file=/etc/transmission-daemon/settings.json
|
transmission_settings_file=${TRANSMISSION_HOME}/settings.json
|
||||||
port_assignment_url=https://www.privateinternetaccess.com/vpninfo/port_forward_assignment
|
port_assignment_url=https://www.privateinternetaccess.com/vpninfo/port_forward_assignment
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user