From 93c1414217ea13ca8b3edcb54ad2f0a73039b325 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Fri, 14 Oct 2022 18:38:39 +0200 Subject: [PATCH] systemctl instead of service in v-restart-dns --- bin/v-restart-dns | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/v-restart-dns b/bin/v-restart-dns index 4e7712a7c..f96937a14 100755 --- a/bin/v-restart-dns +++ b/bin/v-restart-dns @@ -55,9 +55,10 @@ if [ -z "$DNS_SYSTEM" ] || [ "$DNS_SYSTEM" = 'remote' ] ; then fi # Restart system -service $DNS_SYSTEM reload >/dev/null 2>&1 +systemctl reset-failed $DNS_SYSTEM +systemctl reload $DNS_SYSTEM >/dev/null 2>&1 if [ $? -ne 0 ]; then - service $DNS_SYSTEM restart >/dev/null 2>&1 + systemctl restart $DNS_SYSTEM >/dev/null 2>&1 if [ $? -ne 0 ]; then send_email_report check_result $E_RESTART "$DNS_SYSTEM restart failed"