mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-11-22 10:34:57 +00:00
enhanced a few things. running plain ubuntu, openvpn starts transmission when connection is establised and so on
This commit is contained in:
parent
c58b4871d0
commit
f053cb6c42
22
Dockerfile
22
Dockerfile
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Version 0.9
|
||||
|
||||
FROM phusion/baseimage:0.9.15
|
||||
FROM ubuntu:14.04
|
||||
MAINTAINER Kristian Haugene
|
||||
|
||||
VOLUME /data
|
||||
@ -21,19 +21,6 @@ RUN apt-get install -y transmission-common
|
||||
RUN apt-get install -y transmission-daemon
|
||||
RUN apt-get install -y openvpn
|
||||
RUN apt-get install -y curl
|
||||
RUN apt-get install -y screen
|
||||
|
||||
# Transmission service
|
||||
RUN mkdir -p /etc/service/transmission/
|
||||
ADD transmission/run.sh /etc/service/transmission/run
|
||||
|
||||
# Transmission port updater
|
||||
RUN mkdir -p /etc/service/portupdater/
|
||||
ADD transmission/runUpdates.sh /etc/service/portupdater/run
|
||||
|
||||
# OpenVPN service
|
||||
RUN mkdir -p /etc/service/openvpn/
|
||||
ADD runOpenVpn.sh /etc/service/openvpn/run
|
||||
|
||||
VOLUME /config
|
||||
|
||||
@ -41,14 +28,17 @@ VOLUME /config
|
||||
ADD piaconfig/config.ovpn /etc/openvpn/config.ovpn
|
||||
ADD piaconfig/ca.crt /etc/openvpn/ca.crt
|
||||
ADD piaconfig/crl.pem /etc/openvpn/crl.pem
|
||||
ADD runOpenVpn.sh /etc/openvpn/start.sh
|
||||
ADD transmission/defaultSettings.json /etc/transmission-daemon/settings.json
|
||||
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
|
||||
ADD transmission/runUpdates.sh /etc/transmission-daemon/startPortUpdates.sh
|
||||
ADD transmission/down.sh /etc/transmission-daemon/stop.sh
|
||||
ADD runOpenVpn.sh /etc/openvpn/start.sh
|
||||
|
||||
# Expose port and run. Use baseimage-docker's init system
|
||||
EXPOSE 9091
|
||||
CMD ["/sbin/my_init"]
|
||||
CMD ["/etc/openvpn/start.sh"]
|
||||
|
||||
# Clean up APT when done.
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
@ -15,4 +15,7 @@ verb 1
|
||||
reneg-sec 0
|
||||
crl-verify /etc/openvpn/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
|
||||
|
3
transmission/down.sh
Executable file
3
transmission/down.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
kill $(ps aux | grep transmission-daemon | grep -v grep | awk '{print $2}')
|
@ -3,8 +3,12 @@
|
||||
if [ -f /config/transmission/settings.json ];
|
||||
then
|
||||
echo "STARTING TRANSMISSION: Using custom config directory /config/transmission"
|
||||
exec /usr/bin/transmission-daemon -f -g /config/transmission/
|
||||
exec /usr/bin/transmission-daemon -g /config/transmission/ &
|
||||
else
|
||||
echo "STARTING TRANSMISSION: No configuration provided, using defaults"
|
||||
exec /usr/bin/transmission-daemon -f -g /etc/transmission-daemon/
|
||||
exec /usr/bin/transmission-daemon -g /etc/transmission-daemon/ &
|
||||
fi
|
||||
|
||||
exec /etc/transmission-daemon/startPortUpdates.sh &
|
||||
|
||||
echo "STARTED PORT UPDATER"
|
||||
|
Loading…
Reference in New Issue
Block a user