Skip to content

Commit a48a8df

Browse files
committed
Fix for DHCP ip addresses
1 parent 42a100c commit a48a8df

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

bin/v-update-sys-ip

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ is_object_valid 'user' 'USER' "$user" "$user"
3636

3737
# Get list of ip addresses
3838
ip_list=$(/sbin/ifconfig | grep 'inet addr:' | cut -f 2 -d : | \
39-
cut -f 1 -d ' '| grep -v 127.0.0.1 | grep -v '0.0.0.')
39+
cut -f 1 -d ' '| grep -v 127.0.0.1 | grep -v "^0.0.0.")
4040
ip_num=$(echo "$ip_list" | wc -l)
4141

42-
# WorkAround for Amazon stop/start issue
42+
# WorkAround for DHCP IP address
4343
vst_ip_list=$(ls $VESTA/data/ips/)
4444
vst_ip_num=$(echo "$vst_ip_list" | wc -l)
4545

@@ -52,10 +52,6 @@ if [ ! -z "$vst_ip_list" ] && [ "$vst_ip_num" -eq '1' ]; then
5252
mv /etc/$PROXY_SYSTEM/conf.d/$old.conf \
5353
/etc/$PROXY_SYSTEM/conf.d/$new.conf
5454
sed -i "s/$old/$new/g" /etc/$PROXY_SYSTEM/conf.d/$new.conf
55-
$BIN/v-restart-proxy
56-
if [ $? -ne 0 ]; then
57-
exit $E_RESTART
58-
fi
5955
fi
6056
if [ ! -z "$WEB_SYSTEM" ]; then
6157
mv /etc/$WEB_SYSTEM/conf.d/$old.conf \
@@ -67,11 +63,9 @@ if [ ! -z "$vst_ip_list" ] && [ "$vst_ip_num" -eq '1' ]; then
6763
for user in $(ls $VESTA/data/users/); do
6864
$BIN/v-rebuild-web-domains $user no
6965
done
70-
$BIN/v-restart-web
71-
if [ $? -ne 0 ]; then
72-
exit $E_RESTART
73-
fi
7466
fi
67+
$BIN/v-restart-web
68+
$BIN/v-restart-proxy
7569

7670
if [ ! -z "$DNS_SYSTEM" ]; then
7771
# Rebuild dns domains

0 commit comments

Comments
 (0)