moved scripts and templates out of transmission daemon home folder. this allows mounting of /etc/transmission-daemon to keep state, ref issue #22

This commit is contained in:
Kristian Haugene 2015-08-09 21:00:49 +02:00
parent adab8884f4
commit 0949d82219
32 changed files with 61 additions and 61 deletions

View File

@ -19,7 +19,7 @@ RUN apt-get update \
# Add configuration and scripts
ADD openvpn/ /etc/openvpn/
ADD transmission/ /etc/transmission-daemon/
ADD transmission/ /etc/transmission/
ENV OPENVPN_USERNAME=**None** \
OPENVPN_PASSWORD=**None** \

View File

@ -17,5 +17,5 @@ auth-user-pass /config/openvpn-credentials.txt
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
script-security 2
up /etc/transmission-daemon/start.sh
down /etc/transmission-daemon/stop.sh
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -48,6 +48,6 @@ echo $TRANSMISSION_RPC_USERNAME > /config/transmission-credentials.txt
echo $TRANSMISSION_RPC_PASSWORD >> /config/transmission-credentials.txt
# Persist transmission settings for use by transmission-daemon
dockerize -template /etc/transmission-daemon/environment-variables.tmpl:/etc/transmission-daemon/environment-variables.sh /bin/true
dockerize -template /etc/transmission/environment-variables.tmpl:/etc/transmission/environment-variables.sh /bin/true
exec openvpn --config "$OPENVPN_CONFIG"

View File

@ -3,6 +3,6 @@
while [ 1 ]
do
sleep 1m
/etc/transmission-daemon/updatePort.sh
/etc/transmission/updatePort.sh
sleep 1h
done

View File

@ -1,14 +1,14 @@
#!/bin/sh
# Source our persisted env variables from container startup
. /etc/transmission-daemon/environment-variables.sh
. /etc/transmission/environment-variables.sh
tun0ip=$(ifconfig tun0 | sed -n '2 p' | awk '{print $2}' | cut -d: -f2)
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-daemon/settings.tmpl:/etc/transmission-daemon/settings.json /bin/true
dockerize -template /etc/transmission/settings.tmpl:/etc/transmission-daemon/settings.json /bin/true
echo "STARTING TRANSMISSION"
exec /usr/bin/transmission-daemon -g /etc/transmission-daemon/ &
@ -16,7 +16,7 @@ exec /usr/bin/transmission-daemon -g /etc/transmission-daemon/ &
if [ "$OPENVPN_PROVIDER" = "PIA" ]
then
echo "STARTING PORT UPDATER"
exec /etc/transmission-daemon/periodicUpdates.sh &
exec /etc/transmission/periodicUpdates.sh &
else
echo "NO PORT UPDATER FOR THIS PROVIDER"
fi

View File

@ -9,7 +9,7 @@ pia_passwd=$(tail -1 $PIA_PASSWD_FILE)
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-daemon/pia_client_id
pia_client_id_file=/etc/transmission/pia_client_id
transmission_settings_file=/etc/transmission-daemon/settings.json
port_assignment_url=https://www.privateinternetaccess.com/vpninfo/port_forward_assignment