mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
few fixes for aws linux support
This commit is contained in:
parent
4cc3c1d287
commit
4ef7131065
2 changed files with 14 additions and 0 deletions
|
@ -37,6 +37,10 @@ is_password_valid
|
|||
echo "$user:$password" | /usr/sbin/chpasswd
|
||||
md5=$(awk -v user=$user -F : 'user == $1 {print $2}' /etc/shadow)
|
||||
|
||||
if [ "$user" = 'admin' ] && [ -e "$VESTA/web/reset.admin" ]; then
|
||||
rm -f $VESTA/web/reset.admin
|
||||
fi
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
|
|
|
@ -114,6 +114,16 @@ for ip in $ip_list; do
|
|||
fi
|
||||
done
|
||||
|
||||
# Checking NAT
|
||||
pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
|
||||
if [ ! -z "$pub_ip" ] && [ ! -e "$VESTA/data/ips/$pub_ip" ]; then
|
||||
check_nat=$(grep -R "$pub_ip" $VESTA/data/ips/)
|
||||
if [ -z "$check_nat" ]; then
|
||||
ip=$(ls -t $VESTA/data/ips/|head -n1)
|
||||
$BIN/v-change-sys-ip-nat $ip $pub_ip
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue