Merge pull request #8 from disassembler/master
fixing regexp to allow dashes in OVPN_SERVER_URL
This commit is contained in:
		@@ -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]};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user