Blob Blame History Raw
From 882507f36af3ac6cb9c9332b7d34dcec6d12d38e Mon Sep 17 00:00:00 2001
From: Robert Scheck <robert@fedoraproject.org>
Date: Fri, 8 Mar 2019 14:45:02 +0100
Subject: [PATCH] Use `/sbin/service` rather `service` and `reload` rather
 `restart for RHEL/CentOS 6

By default RHEL/CentOS 6 doesn't have `/sbin` in `$PATH`, thus `service clamd restart`
poorly fails by default. Aside of that, a `reload` rather a `restart` is sufficient for
ClamAV as well to reload the ClamAV databases (worked already for years now). If at all
this should be turned into `condrestart` rather `restart`, because RHEL/CentOS 6 might
not use `/etc/init.d/clamd` service at all, but `/etc/init.d/clamd.amavisd` service;
which gets relevant when ClamAV is used only for Amavisd-New, but not for the actual
system...nobody would like to see a maybe unused service to be started by a cronjob...
---
 config/os.centos6-cpanel.conf | 2 +-
 config/os.centos6.conf        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/os.centos6-cpanel.conf b/config/os.centos6-cpanel.conf
index 02ed033..6ac3044 100644
--- a/config/os.centos6-cpanel.conf
+++ b/config/os.centos6-cpanel.conf
@@ -27,7 +27,7 @@ clam_dbs="/usr/local/cpanel/3rdparty/share/clamav"
 
 clamd_pid="/var/run/clamav/clamd.pid"
 
-clamd_restart_opt="service clamd restart"
+clamd_restart_opt="/sbin/service clamd reload"
 
 #clamd_socket="/var/run/clamd.socket"
 
diff --git a/config/os.centos6.conf b/config/os.centos6.conf
index af48428..fab6495 100644
--- a/config/os.centos6.conf
+++ b/config/os.centos6.conf
@@ -27,7 +27,7 @@ clam_dbs="/var/lib/clamav"
 
 clamd_pid="/var/run/clamav/clamd.pid"
 
-clamd_restart_opt="service clamd restart"
+clamd_restart_opt="/sbin/service clamd reload"
 
 #clamd_socket="/var/run/clamd.socket"