Merge pull request #25 from dougnukem/transmission-resume-torrent

This commit is contained in:
Kristian Haugene 2015-08-15 16:46:01 +02:00
commit cdc289545a
4 changed files with 10 additions and 4 deletions

View File

@ -95,6 +95,7 @@ ENV OPENVPN_USERNAME=**None** \
"TRANSMISSION_UTP_ENABLED=true" \
"TRANSMISSION_WATCH_DIR=/data/watch" \
"TRANSMISSION_WATCH_DIR_ENABLED=true" \
"TRANSMISSION_HOME=/data/transmission-home" \
RESOLV_OVERRIDE=**None**
# Expose port and run

View File

@ -1,5 +1,5 @@
#! /bin/sh
export TRANSMISSION_HOME={{ .Env.TRANSMISSION_HOME }}
export TRANSMISSION_ALT_SPEED_DOWN={{ .Env.TRANSMISSION_ALT_SPEED_DOWN }}
export TRANSMISSION_ALT_SPEED_ENABLED={{ .Env.TRANSMISSION_ALT_SPEED_ENABLED }}
export TRANSMISSION_ALT_SPEED_TIME_BEGIN={{ .Env.TRANSMISSION_ALT_SPEED_TIME_BEGIN }}

View File

@ -8,10 +8,12 @@ echo "Updating TRANSMISSION_BIND_ADDRESS_IPV4 to tun0 ip: ${tun0ip}"
export TRANSMISSION_BIND_ADDRESS_IPV4=${tun0ip}
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"
exec /usr/bin/transmission-daemon -g /etc/transmission-daemon/ &
exec /usr/bin/transmission-daemon -g ${TRANSMISSION_HOME} &
if [ "$OPENVPN_PROVIDER" = "PIA" ]
then

View File

@ -1,5 +1,8 @@
#! /bin/sh
# Source our persisted env variables from container startup
. /etc/transmission/environment-variables.sh
# Settings
PIA_PASSWD_FILE=/config/openvpn-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)
local_vpn_ip=$(ip addr show tun0 | grep inet | awk '{ print $2 }')
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
#