From acd9008b226dcc40a1f53ce163746de616363144 Mon Sep 17 00:00:00 2001 From: redxef Date: Sat, 7 Aug 2021 19:54:15 +0200 Subject: [PATCH] Add torrent client. --- configuration.env | 1 + docker-compose.yml | 2 ++ start-openvpn.sh | 5 +++++ 3 files changed, 8 insertions(+) create mode 100644 configuration.env diff --git a/configuration.env b/configuration.env new file mode 100644 index 0000000..9ab6271 --- /dev/null +++ b/configuration.env @@ -0,0 +1 @@ +OVPN_CONFIGURATION_FILE=/opt/config.ovpn diff --git a/docker-compose.yml b/docker-compose.yml index c50e9a0..a2a228f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,5 +8,7 @@ services: volumes: - ./config.ovpn:/opt/config.ovpn - ./auth.txt:/opt/auth.txt + - /etc/passwd:/etc/passwd cap_add: - NET_ADMIN + env_file: ./configuration.env diff --git a/start-openvpn.sh b/start-openvpn.sh index 3429ded..8e7e521 100644 --- a/start-openvpn.sh +++ b/start-openvpn.sh @@ -6,5 +6,10 @@ create_net_dev() { chmod 600 /dev/net/tun } +connect_vpn() { + openvpn --config "$OVPN_CONFIGURATION_FILE" --daemon +} + create_net_dev +connect_vpn "$@"