Browse Source

remove nginx config if it is not used

Serghey Rodin 12 years ago
parent
commit
0157c7ff5b
1 changed files with 9 additions and 0 deletions
  1. 9 0
      bin/v-rebuild-web-domains

+ 9 - 0
bin/v-rebuild-web-domains

@@ -111,6 +111,10 @@ else
         if [ -z "$proxy_include" ]; then
         if [ -z "$proxy_include" ]; then
             echo "include $conf;" >> $proxy_conf
             echo "include $conf;" >> $proxy_conf
         fi
         fi
+    else
+        conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
+        sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $conf
+        rm -f $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf
     fi
     fi
 
 
     # Checking SSL proxy
     # Checking SSL proxy
@@ -122,6 +126,11 @@ else
         if [ -z "$proxy_include" ]; then
         if [ -z "$proxy_include" ]; then
             echo "include $conf;" >> $proxy_conf
             echo "include $conf;" >> $proxy_conf
         fi
         fi
+    else
+        conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
+        sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $conf
+        rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf
+
     fi
     fi
 fi
 fi