From 1848c36784fa29fe226ccf59160704e591f17402 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Sun, 8 Oct 2023 15:45:34 +0200 Subject: [PATCH] Update v-suspend-web-domain, allowing restart=no --- bin/v-suspend-web-domain | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/v-suspend-web-domain b/bin/v-suspend-web-domain index 7bd658ceb..d36f5a659 100755 --- a/bin/v-suspend-web-domain +++ b/bin/v-suspend-web-domain @@ -80,12 +80,14 @@ fi update_object_value 'web' 'DOMAIN' "$domain" '$SUSPENDED' 'yes' increase_user_value "$user" '$SUSPENDED_WEB' -# Restarting web server -$BIN/v-restart-web $restart -check_result $? "Web restart failed" >/dev/null - -$BIN/v-restart-proxy $restart -check_result $? "Proxy restart failed" >/dev/null +if [ "$restart" = "yes" ]; then + # Restarting web server + $BIN/v-restart-web $restart + check_result $? "Web restart failed" >/dev/null + + $BIN/v-restart-proxy $restart + check_result $? "Proxy restart failed" >/dev/null +fi # Logging log_event "$OK" "$ARGUMENTS"