From f1616f71969aeacfffdfc532a84b8dfbcdcacfb0 Mon Sep 17 00:00:00 2001 From: Samuel Leathers Date: Sat, 16 Aug 2014 22:32:16 -0400 Subject: [PATCH] fixing regexp to allow dashes in OVPN_SERVER_URL --- bin/ovpn_genconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ovpn_genconfig b/bin/ovpn_genconfig index 059e9d0..a5c4c05 100755 --- a/bin/ovpn_genconfig +++ b/bin/ovpn_genconfig @@ -92,7 +92,7 @@ done # Server name is in the form "udp://vpn.example.com:1194" -if [[ "$OVPN_SERVER_URL" =~ ^((udp|tcp)://)?([0-9a-zA-Z\.]+)(:([0-9]+))?$ ]]; then +if [[ "$OVPN_SERVER_URL" =~ ^((udp|tcp)://)?([0-9a-zA-Z\.\-]+)(:([0-9]+))?$ ]]; then OVPN_PROTO=${BASH_REMATCH[2]}; OVPN_CN=${BASH_REMATCH[3]}; OVPN_PORT=${BASH_REMATCH[5]};