diff --git a/pia-tools b/pia-tools index a1b8f59..f38dc70 100755 --- a/pia-tools +++ b/pia-tools @@ -209,7 +209,7 @@ new_client_id() { request_port() { local username="$(head -1 $PIA_PASSWD_FILE)" local passwd="$(tail -1 $PIA_PASSWD_FILE)" - local local_vpn_ip="$(ip addr show $VIRT_NET_DEV | grep inet | awk '{ print $2 }')" + local local_vpn_ip="$(ip addr show $VIRT_NET_DEV | awk '/inet / { print $2; exit}')" local client_id="$1" [[ -z "$local_vpn_ip" ]] && local_vpn_ip=$LOCAL_IP echo -n "Updating port forwarding... "