@@ -58,58 +58,49 @@ is_domain_suspended 'web'
5858# Get template name
5959get_web_domain_values
6060tpl_file=" $V_WEBTPL /apache_$TPL .tpl"
61- conf=" $V_HOME /$user /conf/httpd.conf"
61+ conf=" $V_HOME /$user /conf/web/ httpd.conf"
6262
6363# Deleting domain
6464del_web_config
6565
6666# Checking ssl
6767if [ " $SSL " = ' yes' ]; then
6868 tpl_file=" $V_WEBTPL /apache_$TPL .stpl"
69- conf=" $V_HOME /$user /conf/shttpd.conf"
69+ conf=" $V_HOME /$user /conf/web/ shttpd.conf"
7070 del_web_config
7171
7272 # Deleting certificates
73- rm -f $V_HOME /$user /conf/ssl.$domain .*
73+ rm -f $V_HOME /$user /conf/web/ ssl.$domain .*
7474 rm -f $V_USERS /$user /ssl/$domain .*
7575fi
7676
7777# Checking nginx
7878if [ ! -z " $NGINX " ]; then
7979 tpl_file=" $V_WEBTPL /ngingx_vhost_$NGINX .tpl"
80- conf=" $V_HOME /$user /conf/nginx.conf"
80+ conf=" $V_HOME /$user /conf/web/ nginx.conf"
8181 del_web_config
8282
8383 if [ " $SSL " = ' yes' ]; then
8484 proxy_string=" proxy_pass https://$ip :$WEB_SSL_PORT ;"
8585 tpl_file=" $V_WEBTPL /ngingx_vhost_$NGINX .stpl"
86- conf=" $V_HOME /$user /conf/snginx.conf"
86+ conf=" $V_HOME /$user /conf/web/ snginx.conf"
8787 del_web_config
8888 fi
8989fi
9090
9191# Checking stats
9292if [ ! -z " $STATS " ] && [ " $STATS " != ' no' ]; then
93- # Parsing pipe line
94- line=$( grep -n " $STATS .$domain .conf" $V_QUEUE /stats.pipe | \
95- cut -f 1 -d : | head -n 1 )
96-
97- # Deleting pipe command
98- if [ ! -z " $line " ]; then
99- sed -i " $line d" $V_QUEUE /stats.pipe
100- fi
101-
102- # Deleteing config
103- rm -f $V_HOME /$user /conf/$STATS .$domain .conf
93+ sed -i " / $domain $/d" $V_QUEUE /stats.pipe
94+ rm -f $V_HOME /$user /conf/web/$STATS .$domain .conf
10495fi
10596
10697# Deleting directory
10798rm -rf $V_HOME /$user /web/$domain
10899
109100# Deleting logs
110- rm -rf /var/log/httpd/domains/$domain .log*
111- rm -rf /var/log/httpd/domains/$domain .bytes
112- rm -rf /var/log/httpd/domains/$domain .error*
101+ rm -f /var/log/httpd/domains/$domain .log*
102+ rm -f /var/log/httpd/domains/$domain .bytes
103+ rm -f /var/log/httpd/domains/$domain .error*
113104
114105
115106# ----------------------------------------------------------#
@@ -122,14 +113,14 @@ del_web_domain
122113# Checking last ssl domain
123114ssl_dom=$( grep " SSL='yes'" $V_USERS /$user /web.conf | wc -l)
124115if [ " $ssl_dom " -eq ' 0' ]; then
125- sed -i " s/ Include /#Include /" $V_HOME /$user /conf/httpd.conf
116+ sed -i " s/ Include /#Include /" $V_HOME /$user /conf/web/ httpd.conf
126117fi
127118
128119# Checking last domain
129120domains=$( wc -l $V_USERS /$user /web.conf| cut -f 1 -d ' ' )
130121if [ " $domains " -eq ' 0' ]; then
131122 conf=' /etc/httpd/conf.d/vesta.conf'
132- line=$( grep -n " $V_HOME /$user /conf/httpd.conf" $conf | cut -f 1 -d : )
123+ line=$( grep -n " $V_HOME /$user /conf/web/ httpd.conf" $conf | cut -f 1 -d : )
133124 if [ ! -z " $line " ]; then
134125 sed -i " $line d" $conf
135126 fi
@@ -140,19 +131,19 @@ conf='/etc/nginx/conf.d/vesta_users.conf'
140131last_nginx=$( grep -v " NGINX=''" $V_USERS /$user /web.conf)
141132last_snginx=$( echo " $last_nginx " | grep " SSL='yes'" )
142133if [ -z " $last_snginx " ]; then
143- sline=$( grep -n " $V_HOME /$user /conf/snginx.conf" $conf | cut -f 1 -d : )
134+ sline=$( grep -n " $V_HOME /$user /conf/web/ snginx.conf" $conf | cut -f 1 -d :)
144135 if [ ! -z " $sline " ]; then
145136 sed -i " $sline d" $conf
146137 fi
147- rm -f $V_HOME /$user /conf/snginx.conf
138+ rm -f $V_HOME /$user /conf/web/ snginx.conf
148139fi
149140
150141if [ -z " $last_nginx " ]; then
151- line=$( grep -n " $V_HOME /$user /conf/nginx.conf" $conf | cut -f 1 -d : )
142+ line=$( grep -n " $V_HOME /$user /conf/web/ nginx.conf" $conf | cut -f 1 -d : )
152143 if [ ! -z " $line " ]; then
153144 sed -i " $line d" $conf
154145 fi
155- rm -f $V_HOME /$user /conf/nginx.conf
146+ rm -f $V_HOME /$user /conf/web/ nginx.conf
156147fi
157148
158149# Decreasing ip value
0 commit comments