mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
fix missing pub_ip during install
This commit is contained in:
parent
de21483533
commit
5c98639825
3 changed files with 6 additions and 12 deletions
|
@ -1132,12 +1132,10 @@ $VESTA/bin/v-update-sys-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/)
|
||||||
|
|
||||||
# Get public ip
|
# Get public ip
|
||||||
pub_ip=$(curl 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
|
||||||
$VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
|
$VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
|
||||||
fi
|
ip=$pub_ip
|
||||||
if [ -z "$pub_ip" ]; then
|
|
||||||
ip=$main_ip
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Firewall configuration
|
# Firewall configuration
|
||||||
|
|
|
@ -1202,12 +1202,10 @@ $VESTA/bin/v-update-sys-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/)
|
||||||
|
|
||||||
# Get public ip
|
# Get public ip
|
||||||
pub_ip=$(curl 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
|
||||||
$VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
|
$VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
|
||||||
fi
|
ip=$pub_ip
|
||||||
if [ -z "$pub_ip" ]; then
|
|
||||||
ip=$main_ip
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Firewall configuration
|
# Firewall configuration
|
||||||
|
|
|
@ -1121,12 +1121,10 @@ $VESTA/bin/v-update-sys-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/)
|
||||||
|
|
||||||
# Get public ip
|
# Get public ip
|
||||||
pub_ip=$(curl 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
|
||||||
$VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
|
$VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
|
||||||
fi
|
ip=$pub_ip
|
||||||
if [ -z "$pub_ip" ]; then
|
|
||||||
ip=$main_ip
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Firewall configuration
|
# Firewall configuration
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue