Răsfoiți Sursa

Fix for clamav: /var/run ownership and foreground option

Serghey Rodin 9 ani în urmă
părinte
comite
9873dfacd0
1 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 5 1
      install/vst-install-rhel.sh

+ 5 - 1
install/vst-install-rhel.sh

@@ -1097,7 +1097,7 @@ if [ "$clamd" = 'yes' ]; then
     wget $vestacp/clamav/freshclam.conf -O /etc/freshclam.conf
     mkdir -p /var/log/clamav
     mkdir -p /var/run/clamav
-    chown clam:clam /var/log/clamav
+    chown clam:clam /var/log/clamav /var/run/clamav
     chown -R clam:clam /var/lib/clamav
     if [ "$release" -eq '7' ]; then
         wget $vestacp/clamav/clamd.service -O \
@@ -1105,6 +1105,10 @@ if [ "$clamd" = 'yes' ]; then
         systemctl --system daemon-reload
     fi
     /usr/bin/freshclam
+    if [ "$release" -eq '7' ]; then
+        sed -i "s/nofork/foreground/" /usr/lib/systemd/system/clamd.service
+        systemctl daemon-reload
+    fi
     chkconfig clamd on
     service clamd start
     #check_result $? "clamd start failed"