Skip to content

Commit 8a6e7d0

Browse files
author
Kristan Kenney
committed
Update web domain suspension scripts
1 parent 0abc9a7 commit 8a6e7d0

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

bin/v-suspend-web-domain

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
7171
fi
7272
fi
7373

74-
# Rebuild global domain configuration
75-
$BIN/v-rebuild-web-domain $user $domain 'no'
76-
7774
#----------------------------------------------------------#
7875
# Hestia #
7976
#----------------------------------------------------------#
@@ -82,6 +79,9 @@ $BIN/v-rebuild-web-domain $user $domain 'no'
8279
update_object_value 'web' 'DOMAIN' "$domain" '$SUSPENDED' 'yes'
8380
increase_user_value "$user" '$SUSPENDED_WEB'
8481

82+
# Update global configuration files
83+
$BIN/v-rebuild-web-domain $user $domain 'no'
84+
8585
# Restarting web server
8686
$BIN/v-restart-web $restart
8787
check_result $? "Web restart failed" >/dev/null

bin/v-unsuspend-web-domain

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,13 @@ if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
6969
fi
7070
fi
7171

72-
# Rebuild global domain configuration
73-
$BIN/v-rebuild-web-domain $user $domain 'no'
72+
# Rebuilding backend configuration
73+
if [ ! -z "$WEB_BACKEND" ]; then
74+
prepare_web_backend
75+
delete_web_backend
76+
template=$(get_object_value 'web' 'DOMAIN' "$domain" '$BACKEND')
77+
$BIN/v-add-web-domain-backend $user $domain $template $restart
78+
fi
7479

7580
#----------------------------------------------------------#
7681
# Hestia #
@@ -80,6 +85,9 @@ $BIN/v-rebuild-web-domain $user $domain 'no'
8085
update_object_value 'web' 'DOMAIN' "$domain" '$SUSPENDED' 'no'
8186
decrease_user_value "$user" '$SUSPENDED_WEB'
8287

88+
# Update global configuration files
89+
$BIN/v-rebuild-web-domain $user $domain 'no'
90+
8391
# Restarting web server
8492
$BIN/v-restart-web $restart
8593
check_result $? "Web restart failed" >/dev/null

0 commit comments

Comments
 (0)