Skip to content

Commit 5c98639

Browse files
committed
fix missing pub_ip during install
1 parent de21483 commit 5c98639

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

install/vst-install-debian.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,12 +1132,10 @@ $VESTA/bin/v-update-sys-ip
11321132
ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
11331133

11341134
# Get public ip
1135-
pub_ip=$(curl vestacp.com/what-is-my-ip/)
1135+
pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
11361136
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
11371137
$VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
1138-
fi
1139-
if [ -z "$pub_ip" ]; then
1140-
ip=$main_ip
1138+
ip=$pub_ip
11411139
fi
11421140

11431141
# Firewall configuration

install/vst-install-rhel.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,12 +1202,10 @@ $VESTA/bin/v-update-sys-ip
12021202
ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
12031203

12041204
# Get public ip
1205-
pub_ip=$(curl vestacp.com/what-is-my-ip/)
1205+
pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
12061206
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
12071207
$VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
1208-
fi
1209-
if [ -z "$pub_ip" ]; then
1210-
ip=$main_ip
1208+
ip=$pub_ip
12111209
fi
12121210

12131211
# Firewall configuration

install/vst-install-ubuntu.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,12 +1121,10 @@ $VESTA/bin/v-update-sys-ip
11211121
ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
11221122

11231123
# Get public ip
1124-
pub_ip=$(curl vestacp.com/what-is-my-ip/)
1124+
pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
11251125
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
11261126
$VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
1127-
fi
1128-
if [ -z "$pub_ip" ]; then
1129-
ip=$main_ip
1127+
ip=$pub_ip
11301128
fi
11311129

11321130
# Firewall configuration

0 commit comments

Comments
 (0)