Skip to content

Commit 862e262

Browse files
authored
Fixing a bug that caused $pub_ip is always empty string
Putting update-firewall before getting $pub_ip is fixing this issue
1 parent be837cb commit 862e262

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

install/vst-install-rhel.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,18 +1226,18 @@ $VESTA/bin/v-update-sys-ip
12261226
# Get main ip
12271227
ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
12281228

1229+
# Firewall configuration
1230+
if [ "$iptables" = 'yes' ]; then
1231+
$VESTA/bin/v-update-firewall
1232+
fi
1233+
12291234
# Get public ip
12301235
pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
12311236
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
12321237
$VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
12331238
ip=$pub_ip
12341239
fi
12351240

1236-
# Firewall configuration
1237-
if [ "$iptables" = 'yes' ]; then
1238-
$VESTA/bin/v-update-firewall
1239-
fi
1240-
12411241
# Configuring mysql host
12421242
if [ "$mysql" = 'yes' ]; then
12431243
$VESTA/bin/v-add-database-host mysql localhost root $vpass

0 commit comments

Comments
 (0)