浏览代码

delete config only when there is no domain

Serghey Rodin 9 年之前
父节点
当前提交
7eb7a81c0a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      func/domain.sh

+ 1 - 1
func/domain.sh

@@ -271,7 +271,7 @@ del_web_config() {
     get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf
     get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf
     sed -i "$top_line,$bottom_line d" $conf
     sed -i "$top_line,$bottom_line d" $conf
 
 
-    web_domain=$(grep $domain $USER_DATA/web.conf |wc -l)
+    web_domain=$(grep DOMAIN $USER_DATA/web.conf |wc -l)
     if [ "$web_domain" -eq '0' ]; then
     if [ "$web_domain" -eq '0' ]; then
         sed -i "/.*\/$user\/.*$1.conf/d" /etc/$1/conf.d/vesta.conf
         sed -i "/.*\/$user\/.*$1.conf/d" /etc/$1/conf.d/vesta.conf
         rm -f $conf
         rm -f $conf