systemctl instead of service in v-restart-dns

This commit is contained in:
myvesta 2022-10-14 18:38:39 +02:00 committed by GitHub
parent 7f38c8ceaf
commit 93c1414217
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,9 +55,10 @@ if [ -z "$DNS_SYSTEM" ] || [ "$DNS_SYSTEM" = 'remote' ] ; then
fi fi
# Restart system # 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 if [ $? -ne 0 ]; then
service $DNS_SYSTEM restart >/dev/null 2>&1 systemctl restart $DNS_SYSTEM >/dev/null 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
send_email_report send_email_report
check_result $E_RESTART "$DNS_SYSTEM restart failed" check_result $E_RESTART "$DNS_SYSTEM restart failed"