mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
Fixing a bug that caused $pub_ip is always empty string
Putting update-firewall before getting $pub_ip is fixing this issue
This commit is contained in:
parent
862e26200c
commit
6a955cd794
1 changed files with 5 additions and 5 deletions
|
@ -1125,6 +1125,11 @@ $VESTA/bin/v-update-sys-ip
|
|||
# Get main ip
|
||||
ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
|
||||
|
||||
# Firewall configuration
|
||||
if [ "$iptables" = 'yes' ]; then
|
||||
$VESTA/bin/v-update-firewall
|
||||
fi
|
||||
|
||||
# Get public ip
|
||||
pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
|
||||
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
|
||||
|
@ -1132,11 +1137,6 @@ if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
|
|||
ip=$pub_ip
|
||||
fi
|
||||
|
||||
# Firewall configuration
|
||||
if [ "$iptables" = 'yes' ]; then
|
||||
$VESTA/bin/v-update-firewall
|
||||
fi
|
||||
|
||||
# Configuring mysql host
|
||||
if [ "$mysql" = 'yes' ]; then
|
||||
$VESTA/bin/v-add-database-host mysql localhost root $vpass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue