File tree Expand file tree Collapse file tree 3 files changed +17
-13
lines changed Expand file tree Collapse file tree 3 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 44
55- Added ` TUNNEL_INTERFACE ` to set interface name (in case of multiple containers)
66- Some fixes for general user
7+ - Changed generation of ` include-conf.conf ` to ` dynamic.conf `
78
89### 2.0.1 - Fix service start
910
Original file line number Diff line number Diff line change 1010# Change permissions (user & group)
1111iproute "/usr/local/sbin/ovpn-ip"
1212
13- # Static interface
14- dev tun0
15-
1613# Script security level
1714script-security 2
1815
@@ -54,4 +51,4 @@ client-config-dir /config/openvpn/ccd
5451crl-verify /config/pki/crl.pem
5552
5653# Include configs
57- config /config/openvpn/include-conf .conf
54+ config /config/openvpn/dynamic .conf
Original file line number Diff line number Diff line change 11#! /usr/bin/with-contenv bash
22
33#
4- # Link OpenVPN configs
4+ # Dynamic OpenVPN configs
55#
66
7- LINK_FILE =/config/openvpn/include-conf .conf
7+ DYNAMIC_FILE =/config/openvpn/dynamic .conf
88
99# Build link file
10- echo " #" > $LINK_FILE
11- echo " # DO NOT EDIT" >> $LINK_FILE
12- echo " # Autogenerated file, based on /config/openvpn/config" >> $LINK_FILE
13- echo " #" >> $LINK_FILE
14- echo " " >> $LINK_FILE
10+ echo " #" > $DYNAMIC_FILE
11+ echo " # DO NOT EDIT" >> $DYNAMIC_FILE
12+ echo " # Autogenerated file, based on /config/openvpn/config" >> $DYNAMIC_FILE
13+ echo " #" >> $DYNAMIC_FILE
14+ echo " " >> $DYNAMIC_FILE
1515
16+ # Set interface name
17+ echo " # Interface" >> $DYNAMIC_FILE
18+ echo " dev $TUNNEL_INTERFACE " >> $DYNAMIC_FILE
19+ echo " " >> $DYNAMIC_FILE
20+
21+ # Include all configuration files
1622for file in /config/openvpn/config/*
1723do
1824 [ -e " $file " ] || continue
1925
20- echo " config $file " >> $LINK_FILE
26+ echo " config $file " >> $DYNAMIC_FILE
2127done
2228
23- chown abc:abc $LINK_FILE
29+ chown $CONTAINER_USER : $CONTAINER_USER $DYNAMIC_FILE
You can’t perform that action at this time.
0 commit comments