Skip to content

Commit 6a955cd

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 862e262 commit 6a955cd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

install/vst-install-ubuntu.sh

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

1128+
# Firewall configuration
1129+
if [ "$iptables" = 'yes' ]; then
1130+
$VESTA/bin/v-update-firewall
1131+
fi
1132+
11281133
# Get public ip
11291134
pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
11301135
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
11311136
$VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
11321137
ip=$pub_ip
11331138
fi
11341139

1135-
# Firewall configuration
1136-
if [ "$iptables" = 'yes' ]; then
1137-
$VESTA/bin/v-update-firewall
1138-
fi
1139-
11401140
# Configuring mysql host
11411141
if [ "$mysql" = 'yes' ]; then
11421142
$VESTA/bin/v-add-database-host mysql localhost root $vpass

0 commit comments

Comments
 (0)