mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-07-05 17:11:47 +00:00
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:
parent
adab8884f4
commit
0949d82219
|
@ -19,7 +19,7 @@ RUN apt-get update \
|
||||||
|
|
||||||
# Add configuration and scripts
|
# Add configuration and scripts
|
||||||
ADD openvpn/ /etc/openvpn/
|
ADD openvpn/ /etc/openvpn/
|
||||||
ADD transmission/ /etc/transmission-daemon/
|
ADD transmission/ /etc/transmission/
|
||||||
|
|
||||||
ENV OPENVPN_USERNAME=**None** \
|
ENV OPENVPN_USERNAME=**None** \
|
||||||
OPENVPN_PASSWORD=**None** \
|
OPENVPN_PASSWORD=**None** \
|
||||||
|
|
|
@ -17,5 +17,5 @@ auth-user-pass /config/openvpn-credentials.txt
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -18,5 +18,5 @@ crl-verify /etc/openvpn/pia/crl.pem
|
||||||
|
|
||||||
# OpenVPN control startup and shut down of transmission
|
# OpenVPN control startup and shut down of transmission
|
||||||
script-security 2
|
script-security 2
|
||||||
up /etc/transmission-daemon/start.sh
|
up /etc/transmission/start.sh
|
||||||
down /etc/transmission-daemon/stop.sh
|
down /etc/transmission/stop.sh
|
||||||
|
|
|
@ -48,6 +48,6 @@ echo $TRANSMISSION_RPC_USERNAME > /config/transmission-credentials.txt
|
||||||
echo $TRANSMISSION_RPC_PASSWORD >> /config/transmission-credentials.txt
|
echo $TRANSMISSION_RPC_PASSWORD >> /config/transmission-credentials.txt
|
||||||
|
|
||||||
# Persist transmission settings for use by transmission-daemon
|
# 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"
|
exec openvpn --config "$OPENVPN_CONFIG"
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
while [ 1 ]
|
while [ 1 ]
|
||||||
do
|
do
|
||||||
sleep 1m
|
sleep 1m
|
||||||
/etc/transmission-daemon/updatePort.sh
|
/etc/transmission/updatePort.sh
|
||||||
sleep 1h
|
sleep 1h
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Source our persisted env variables from container startup
|
# 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)
|
tun0ip=$(ifconfig tun0 | sed -n '2 p' | awk '{print $2}' | cut -d: -f2)
|
||||||
echo "Updating TRANSMISSION_BIND_ADDRESS_IPV4 to tun0 ip: ${tun0ip}"
|
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-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"
|
echo "STARTING TRANSMISSION"
|
||||||
exec /usr/bin/transmission-daemon -g /etc/transmission-daemon/ &
|
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" ]
|
if [ "$OPENVPN_PROVIDER" = "PIA" ]
|
||||||
then
|
then
|
||||||
echo "STARTING PORT UPDATER"
|
echo "STARTING PORT UPDATER"
|
||||||
exec /etc/transmission-daemon/periodicUpdates.sh &
|
exec /etc/transmission/periodicUpdates.sh &
|
||||||
else
|
else
|
||||||
echo "NO PORT UPDATER FOR THIS PROVIDER"
|
echo "NO PORT UPDATER FOR THIS PROVIDER"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -9,7 +9,7 @@ pia_passwd=$(tail -1 $PIA_PASSWD_FILE)
|
||||||
transmission_username=$(head -1 $TRANSMISSION_PASSWD_FILE)
|
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-daemon/pia_client_id
|
pia_client_id_file=/etc/transmission/pia_client_id
|
||||||
transmission_settings_file=/etc/transmission-daemon/settings.json
|
transmission_settings_file=/etc/transmission-daemon/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