few fixes for aws linux support

This commit is contained in:
Serghey Rodin 2018-03-29 16:35:31 +03:00
commit 4ef7131065
2 changed files with 14 additions and 0 deletions

View file

@ -37,6 +37,10 @@ is_password_valid
echo "$user:$password" | /usr/sbin/chpasswd echo "$user:$password" | /usr/sbin/chpasswd
md5=$(awk -v user=$user -F : 'user == $1 {print $2}' /etc/shadow) 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 # # Vesta #

View file

@ -114,6 +114,16 @@ for ip in $ip_list; do
fi fi
done 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 # # Vesta #