File tree 3 files changed +17
-13
lines changed
3 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 4
4
5
5
- Added ` TUNNEL_INTERFACE ` to set interface name (in case of multiple containers)
6
6
- Some fixes for general user
7
+ - Changed generation of ` include-conf.conf ` to ` dynamic.conf `
7
8
8
9
### 2.0.1 - Fix service start
9
10
Original file line number Diff line number Diff line change 10
10
# Change permissions (user & group)
11
11
iproute "/usr/local/sbin/ovpn-ip"
12
12
13
- # Static interface
14
- dev tun0
15
-
16
13
# Script security level
17
14
script-security 2
18
15
@@ -54,4 +51,4 @@ client-config-dir /config/openvpn/ccd
54
51
crl-verify /config/pki/crl.pem
55
52
56
53
# 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 1
1
#! /usr/bin/with-contenv bash
2
2
3
3
#
4
- # Link OpenVPN configs
4
+ # Dynamic OpenVPN configs
5
5
#
6
6
7
- LINK_FILE =/config/openvpn/include-conf .conf
7
+ DYNAMIC_FILE =/config/openvpn/dynamic .conf
8
8
9
9
# 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
15
15
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
16
22
for file in /config/openvpn/config/*
17
23
do
18
24
[ -e " $file " ] || continue
19
25
20
- echo " config $file " >> $LINK_FILE
26
+ echo " config $file " >> $DYNAMIC_FILE
21
27
done
22
28
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