Просмотр исходного кода

Rebuild web configuration during suspension activities

Kristan Kenney 6 лет назад
Родитель
Сommit
481ee7c5f4
3 измененных файлов с 5 добавлено и 10 удалено
  1. 2 0
      bin/v-suspend-web-domain
  2. 2 0
      bin/v-unsuspend-web-domain
  3. 1 10
      func/domain.sh

+ 2 - 0
bin/v-suspend-web-domain

@@ -71,6 +71,8 @@ if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
     fi
 fi
 
+# Rebuild global domain configuration
+$BIN/v-rebuild-web-domain $user $domain 'no'
 
 #----------------------------------------------------------#
 #                       Hestia                             #

+ 2 - 0
bin/v-unsuspend-web-domain

@@ -69,6 +69,8 @@ if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
     fi
 fi
 
+# Rebuild global domain configuration
+$BIN/v-rebuild-web-domain $user $domain 'no'
 
 #----------------------------------------------------------#
 #                       Hestia                             #

+ 1 - 10
func/domain.sh

@@ -288,14 +288,6 @@ replace_web_config() {
 
     if [ -e "$conf" ]; then
         sed -i  "s|$old|$new|g" $conf
-    else
-        # fallback to old style configs
-        conf="$HOMEDIR/$user/conf/web/$1.conf"
-        if [[ "$2" =~ stpl$ ]]; then
-            conf="$HOMEDIR/$user/conf/web/s$1.conf"
-        fi
-        get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf
-        sed -i  "$top_line,$bottom_line s|$old|$new|g" $conf
     fi
 }
 
@@ -322,8 +314,7 @@ del_web_config() {
         if [[ "$2" =~ stpl$ ]]; then
             conf="$HOMEDIR/$user/conf/web/s$1.conf"
         fi
-        get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf
-        sed -i "$top_line,$bottom_line d" $conf
+        rm -f $conf
 
         # Remove old global includes file
         rm -f /etc/$1/conf.d/hestia.conf