File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ addArg "--config" "$OVPN_CONFIG"
10
10
# Server name is in the form "udp://vpn.example.com:1194"
11
11
if [[ " $OVPN_SERVER_URL " =~ ^(( udp| tcp)(4 | 6 )?:// )? ([0 - 9 a- zA- Z\.\- ]+ )(: ([0 - 9 ]+ )) ? $ ]]; then
12
12
OVPN_PROTO=${BASH_REMATCH[2]} ;
13
- OVPN_CN=${BASH_REMATCH[3 ]} ;
14
- OVPN_PORT=${BASH_REMATCH[5 ]} ;
13
+ OVPN_CN=${BASH_REMATCH[4 ]} ;
14
+ OVPN_PORT=${BASH_REMATCH[6 ]} ;
15
15
else
16
16
echo " Need to pass in OVPN_SERVER_URL in 'proto://fqdn:port' format"
17
17
exit 1
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ podcidr=$4
10
10
# Server name is in the form "udp://vpn.example.com:1194"
11
11
if [[ " $serverurl " =~ ^(( udp| tcp)(4 | 6 )?:// )? ([0 - 9 a- zA- Z\.\- ]+ )(: ([0 - 9 ]+ )) ? $ ]]; then
12
12
OVPN_PROTO=$( echo ${BASH_REMATCH[2]} | tr ' [:lower:]' ' [:upper:]' )
13
- OVPN_CN=$( echo ${BASH_REMATCH[3 ]} | tr ' [:upper:]' ' [:lower:]' )
14
- OVPN_PORT=${BASH_REMATCH[5 ]} ;
13
+ OVPN_CN=$( echo ${BASH_REMATCH[4 ]} | tr ' [:upper:]' ' [:lower:]' )
14
+ OVPN_PORT=${BASH_REMATCH[6 ]} ;
15
15
else
16
16
echo " Need to pass in OpenVPN URL in 'proto://fqdn:port' format"
17
17
echo " eg: tcp://my.fully.qualified.domain.com:1194"
You can’t perform that action at this time.
0 commit comments