mirror of
				https://github.com/angristan/openvpn-install.git
				synced 2025-10-31 14:07:36 +01:00 
			
		
		
		
	Bugfix for systems with multiple IPv4 addresses available
This commit is contained in:
		| @@ -21,7 +21,7 @@ fi | ||||
| # Try to get our IP from the system and fallback to the Internet. | ||||
| # I do this to make the script compatible with NATed servers (lowendspirit.com) | ||||
| # and to avoid getting an IPv6. | ||||
| IP=$(ifconfig | grep 'inet addr:' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | cut -d: -f2 | awk '{ print $1}') | ||||
| IP=$(ifconfig | grep 'inet addr:' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | cut -d: -f2 | awk '{ print $1}' | head -1) | ||||
| if [ "$IP" = "" ]; then | ||||
|         IP=$(wget -qO- ipv4.icanhazip.com) | ||||
| fi | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Nyr
					Nyr