Skip to content

Commit 19beced

Browse files
committed
fixed no_web_domains case
1 parent 2cf57ee commit 19beced

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bin/v_rebuild_web_domains

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,14 @@ done
105105
# Renaming tmp config
106106
tmp_conf="$V_HOME/$user/conf/tmp_httpd.conf"
107107
conf="$V_HOME/$user/conf/httpd.conf"
108-
mv $tmp_conf $conf
108+
if [ -e "$tmp_conf" ]; then
109+
mv $tmp_conf $conf
110+
fi
109111

110112
# Checking include in main httpd.conf
111113
main_conf='/etc/httpd/conf.d/vesta.conf'
112114
main_conf_check=$(grep "$conf" $main_conf )
113-
if [ -z "$main_conf_check" ]; then
115+
if [ ! -z "$domains" ] && [ -z "$main_conf_check" ]; then
114116
echo "Include $conf" >>$main_conf
115117
fi
116118

0 commit comments

Comments
 (0)