From 6b2f651418785c94c8fbb6fa6cb78bae048d9025 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 14 Feb 2019 17:47:58 +0200 Subject: [PATCH] protection in case there are two or more ips with the same nat association --- func/ip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/func/ip.sh b/func/ip.sh index 605554af..c99a3272 100644 --- a/func/ip.sh +++ b/func/ip.sh @@ -141,7 +141,7 @@ get_real_ip() { else nat=$(grep -H "^NAT='$1'" $VESTA/data/ips/*) if [ ! -z "$nat" ]; then - echo "$nat" |cut -f 1 -d : |cut -f 7 -d / + echo "$nat" |cut -f 1 -d : |cut -f 7 -d / |head -n 1 fi fi }