clamav sock in installer

This commit is contained in:
myvesta 2020-05-15 19:31:22 +02:00 committed by GitHub
commit 3986d4ec15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1211,8 +1211,6 @@ if [ "$clamd" = 'yes' ]; then
gpasswd -a clamav Debian-exim
cp -f $vestacp/clamav/clamd.conf /etc/clamav/
mkdir -p /var/lib/clamav
touch /var/lib/clamav/clamd.sock
chown clamav:clamav /var/lib/clamav/clamd.sock
/usr/bin/freshclam
update-rc.d clamav-daemon defaults
if [ ! -d "/var/run/clamav" ]; then
@ -1222,8 +1220,7 @@ if [ "$clamd" = 'yes' ]; then
if [ -e "/lib/systemd/system/clamav-daemon.service" ]; then
exec_pre1='ExecStartPre=-/bin/mkdir -p /var/run/clamav'
exec_pre2='ExecStartPre=-/bin/chown -R clamav:clamav /var/run/clamav'
sed -i "s|\[Service\]/|[Service]\n$exec_pre1\n$exec_pre2|g" \
/lib/systemd/system/clamav-daemon.service
sed -i "s|\[Service\]/|[Service]\n$exec_pre1\n$exec_pre2|g" /lib/systemd/system/clamav-daemon.service
systemctl daemon-reload
fi
service clamav-daemon start