Page 1 of 1

v-rebuild-web-domains with nat ip issue

Posted: Mon Aug 25, 2014 4:13 pm
by Kyon
Hello,

I recently used the v-rebuild-web-domains bin and I saw that configs file was not generated correctly. All ip address were "ips" instead of "192.168.1.13" in my case.

I checked sources and I edited this :
# Get real ip address
get_real_ip() {
if [ -e "$VESTA/data/ips/$1" ]; then
echo $1
else
nated_ip=$(grep -H "^NAT='$1'" $VESTA/data/ips/*)
echo "$nated_ip" | cut -f 1 -d : | cut -f 7 -d /
fi
}
# Get real ip address
get_real_ip() {
if [ -e "$VESTA/data/ips/$1" ]; then
echo $1
else
nated_ip=$(grep -H "^NAT='$1'" $VESTA/data/ips/*)
echo "$nated_ip" | cut -f 2 -d "'"
fi
}
Now it's working fine.

PS : I am using last Debian stable version.

Re: v-rebuild-web-domains with nat ip issue

Posted: Mon Aug 25, 2014 4:48 pm
by imperio
Hi,
Write about this problem in our bugtracker
https://bugs.vestacp.com/ (report a problem)

Re: v-rebuild-web-domains with nat ip issue

Posted: Mon Aug 25, 2014 5:46 pm
by Kyon
Ok, The bug was me... !

First, I edited script to get the NAT IP (useless and stupide... we want the local ip...).
After that, the issue raised because I have set my env with VESTA=/usr/local/vesta/. But script use cut with "/" as delimiter so...

I have change my env to set VESTA=/usr/local/vesta

Sorry about that :).

Re: v-rebuild-web-domains with nat ip issue

Posted: Wed Feb 14, 2018 8:46 am
by skurudo
Closed