Browse Source

clamd service for rhel

Ernesto Nicolás Carrea 5 years ago
parent
commit
db0fd3b8d3
2 changed files with 14 additions and 0 deletions
  1. 2 0
      bin/module/clamav/install.inc
  2. 12 0
      install/rhel/clamav/clamd.service

+ 2 - 0
bin/module/clamav/install.inc

@@ -33,6 +33,8 @@ hestia_module_clamav_install() {
         groupadd clamav 2>/dev/null
         useradd clamav -g clamav -s /sbin/nologin -d /var/lib/clamav 2>/dev/null
         cp -f $HESTIA_INSTALL_DIR/clamav/freshclam.conf /etc/
+        cp -f $HESTIA_INSTALL_DIR/clamav/clamd.service /etc/systemd/system/
+        systemctl daemon-reload
     fi
 
     mkdir -p /var/log/clamav /var/run/clamav

+ 12 - 0
install/rhel/clamav/clamd.service

@@ -0,0 +1,12 @@
+[Unit]
+Description = clamd scanner (%i) daemon
+After = syslog.target nss-lookup.target network.target
+
+[Service]
+Type = simple
+ExecStart = /usr/sbin/clamd -c /etc/clamd.conf
+Restart = on-failure
+PrivateTmp = true
+
+[Install]
+WantedBy=multi-user.target