Modify upstream clamav-clamonacc.service to be compatible with current configuration; Add quarantinedir
This commit is contained in:
parent
a201bc2495
commit
7d223776e9
@ -1,13 +1,12 @@
|
|||||||
diff -up clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service clamav-0.103.0/clamonacc/clamav-clamonacc.service.in
|
diff -up clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service clamav-0.103.0/clamonacc/clamav-clamonacc.service.in
|
||||||
--- clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service 2020-09-12 18:27:09.000000000 -0600
|
--- clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service 2020-09-12 18:27:09.000000000 -0600
|
||||||
+++ clamav-0.103.0/clamonacc/clamav-clamonacc.service.in 2020-09-18 19:49:35.400152760 -0600
|
+++ clamav-0.103.0/clamonacc/clamav-clamonacc.service.in 2020-09-18 19:49:35.400152760 -0600
|
||||||
@@ -4,14 +4,14 @@
|
@@ -4,14 +4,12 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=ClamAV On-Access Scanner
|
Description=ClamAV On-Access Scanner
|
||||||
Documentation=man:clamonacc(8) man:clamd.conf(5) https://www.clamav.net/documents
|
Documentation=man:clamonacc(8) man:clamd.conf(5) https://www.clamav.net/documents
|
||||||
-Requires=clamav-daemon.service
|
-Requires=clamav-daemon.service
|
||||||
-After=clamav-daemon.service syslog.target network.target
|
-After=clamav-daemon.service syslog.target network.target
|
||||||
+Requires=clamd@scan.service
|
|
||||||
+After=clamd@scan.service syslog.target network.target
|
+After=clamd@scan.service syslog.target network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
@ -15,8 +14,7 @@ diff -up clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service
|
|||||||
User=root
|
User=root
|
||||||
-ExecStartPre=/bin/bash -c "while [ ! -S /run/clamav/clamd.ctl ]; do sleep 1; done"
|
-ExecStartPre=/bin/bash -c "while [ ! -S /run/clamav/clamd.ctl ]; do sleep 1; done"
|
||||||
-ExecStart=@prefix@/sbin/clamonacc -F --config-file=@APP_CONFIG_DIRECTORY@/clamd.conf --log=/var/log/clamav/clamonacc.log --move=/root/quarantine
|
-ExecStart=@prefix@/sbin/clamonacc -F --config-file=@APP_CONFIG_DIRECTORY@/clamd.conf --log=/var/log/clamav/clamonacc.log --move=/root/quarantine
|
||||||
+ExecStartPre=/bin/bash -c "while [ ! -S /run/clamd.scan/clamd.sock ]; do sleep 1; done"
|
+ExecStart=@prefix@/sbin/clamonacc -F --config-file=/etc/clamd.d/scan.conf
|
||||||
+ExecStart=@prefix@/sbin/clamonacc -F --config-file=/etc/clamd/scan.conf --log=/var/log/clamav/clamonacc.log --move=/root/quarantine
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
%global milterlog %_var/log/clamav-milter.log
|
%global milterlog %_var/log/clamav-milter.log
|
||||||
%global milterstatedir %_rundir/clamav-milter
|
%global milterstatedir %_rundir/clamav-milter
|
||||||
%global pkgdatadir %_datadir/%name
|
%global pkgdatadir %_datadir/%name
|
||||||
|
%global quarantinedir %_var/spool/quarantine
|
||||||
%global scanuser clamscan
|
%global scanuser clamscan
|
||||||
%global scanstatedir %_rundir/clamd.scan
|
%global scanstatedir %_rundir/clamd.scan
|
||||||
|
|
||||||
@ -313,6 +314,7 @@ install -d -m 0755 \
|
|||||||
$RPM_BUILD_ROOT%_var/log \
|
$RPM_BUILD_ROOT%_var/log \
|
||||||
$RPM_BUILD_ROOT%milterstatedir \
|
$RPM_BUILD_ROOT%milterstatedir \
|
||||||
$RPM_BUILD_ROOT%homedir \
|
$RPM_BUILD_ROOT%homedir \
|
||||||
|
$RPM_BUILD_ROOT%quarantinedir \
|
||||||
$RPM_BUILD_ROOT%scanstatedir
|
$RPM_BUILD_ROOT%scanstatedir
|
||||||
|
|
||||||
rm -f $RPM_BUILD_ROOT%_libdir/*.la
|
rm -f $RPM_BUILD_ROOT%_libdir/*.la
|
||||||
@ -541,6 +543,7 @@ fi
|
|||||||
%exclude %_mandir/man5/clamd.conf.5*
|
%exclude %_mandir/man5/clamd.conf.5*
|
||||||
%_unitdir/clamonacc.service
|
%_unitdir/clamonacc.service
|
||||||
%_unitdir/clamav-clamonacc.service
|
%_unitdir/clamav-clamonacc.service
|
||||||
|
%attr(0750,root,root) %dir %quarantinedir
|
||||||
|
|
||||||
|
|
||||||
%files lib
|
%files lib
|
||||||
|
Loading…
Reference in New Issue
Block a user