Skip to content

Commit 9873dfa

Browse files
author
Serghey Rodin
committed
Fix for clamav: /var/run ownership and foreground option
1 parent 81a0d97 commit 9873dfa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

install/vst-install-rhel.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,14 +1097,18 @@ if [ "$clamd" = 'yes' ]; then
10971097
wget $vestacp/clamav/freshclam.conf -O /etc/freshclam.conf
10981098
mkdir -p /var/log/clamav
10991099
mkdir -p /var/run/clamav
1100-
chown clam:clam /var/log/clamav
1100+
chown clam:clam /var/log/clamav /var/run/clamav
11011101
chown -R clam:clam /var/lib/clamav
11021102
if [ "$release" -eq '7' ]; then
11031103
wget $vestacp/clamav/clamd.service -O \
11041104
/usr/lib/systemd/system/clamd.service
11051105
systemctl --system daemon-reload
11061106
fi
11071107
/usr/bin/freshclam
1108+
if [ "$release" -eq '7' ]; then
1109+
sed -i "s/nofork/foreground/" /usr/lib/systemd/system/clamd.service
1110+
systemctl daemon-reload
1111+
fi
11081112
chkconfig clamd on
11091113
service clamd start
11101114
#check_result $? "clamd start failed"

0 commit comments

Comments
 (0)