mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -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
be837cb3e5
commit
862e26200c
1 changed files with 5 additions and 5 deletions
|
@ -1226,6 +1226,11 @@ $VESTA/bin/v-update-sys-ip
|
||||||
# Get main ip
|
# Get main ip
|
||||||
ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
|
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
|
# Get public ip
|
||||||
pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
|
pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
|
||||||
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
|
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
|
||||||
|
@ -1233,11 +1238,6 @@ if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
|
||||||
ip=$pub_ip
|
ip=$pub_ip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Firewall configuration
|
|
||||||
if [ "$iptables" = 'yes' ]; then
|
|
||||||
$VESTA/bin/v-update-firewall
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configuring mysql host
|
# Configuring mysql host
|
||||||
if [ "$mysql" = 'yes' ]; then
|
if [ "$mysql" = 'yes' ]; then
|
||||||
$VESTA/bin/v-add-database-host mysql localhost root $vpass
|
$VESTA/bin/v-add-database-host mysql localhost root $vpass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue