Skip to content

Commit 4ef7131

Browse files
author
Serghey Rodin
committed
few fixes for aws linux support
1 parent 4cc3c1d commit 4ef7131

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

bin/v-change-user-password

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ is_password_valid
3737
echo "$user:$password" | /usr/sbin/chpasswd
3838
md5=$(awk -v user=$user -F : 'user == $1 {print $2}' /etc/shadow)
3939

40+
if [ "$user" = 'admin' ] && [ -e "$VESTA/web/reset.admin" ]; then
41+
rm -f $VESTA/web/reset.admin
42+
fi
43+
4044

4145
#----------------------------------------------------------#
4246
# Vesta #

bin/v-update-sys-ip

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@ for ip in $ip_list; do
114114
fi
115115
done
116116

117+
# Checking NAT
118+
pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
119+
if [ ! -z "$pub_ip" ] && [ ! -e "$VESTA/data/ips/$pub_ip" ]; then
120+
check_nat=$(grep -R "$pub_ip" $VESTA/data/ips/)
121+
if [ -z "$check_nat" ]; then
122+
ip=$(ls -t $VESTA/data/ips/|head -n1)
123+
$BIN/v-change-sys-ip-nat $ip $pub_ip
124+
fi
125+
fi
126+
117127

118128
#----------------------------------------------------------#
119129
# Vesta #

0 commit comments

Comments
 (0)