[clamav-users] Update policy for clamd at .service

Herbert herbert at symmetrix.net
Mon Aug 26 07:22:25 EDT 2019


Followed instructions on how to custimize an existing systemd service:

1) Created new folder /etc/systemd/system/clamd at .service.d

2) Created new file /etc/systemd/system/clamd at .service.d/custom.conf
[Unit]
Description = Customized clamd scanner (%i) daemon
Documentation=man:clamd(8) man:clamd.conf(5) 
https://www.clamav.net/documents/
# Check for database existence
# ConditionPathExistsGlob=@DBDIR@/main.{c[vl]d,inc}
# ConditionPathExistsGlob=@DBDIR@/daily.{c[vl]d,inc}
After = syslog.target nss-lookup.target network.target
[Service]
Type = forking
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf
#Restart = on-failure
TimeoutSec = 600

3) systemctl status clamd at scan.service reports an error:
Warning: The unit file, source configuration file or drop-ins of 
clamd at scan.service changed on disk. Run 'systemctl daemon-reload' to 
reload units.
● clamd at scan.service - Customized clamd scanner (scan) daemon
    Loaded: bad-setting (Reason: Unit clamd at scan.service has a bad unit 
file setting.)
   Drop-In: /etc/systemd/system/clamd at .service.d
            └─custom.conf
    Active: inactive (dead)
      Docs: man:clamd(8)
            man:clamd.conf(5)
            https://www.clamav.net/documents/
            man:clamd(8)
            man:clamd.conf(5)
            https://www.clamav.net/documents/

clamd at scan.service: Service has more than one ExecStart= setting, which 
is only allowed for Type=oneshot services. Refusing.

What am I missing?


On 26.08.2019 12:08, Reio Remma via clamav-users wrote:
> On 26/08/2019 12:27, Fajar A. Nugraha via clamav-users wrote:
>> On Mon, Aug 26, 2019 at 4:18 PM Herbert via clamav-users 
>> <clamav-users at lists.clamav.net 
>> <mailto:clamav-users at lists.clamav.net>> wrote:
>>
>>     Hi all,
>>
>>     System Fedora 5.2.9-200.fc30.x86_64
>>     ClamAv 0.101.4
>>
>>
>>     I wonder why a DNF update changes my customized
>>     /usr/lib/systemd/clam@,service file.
>>
>>
>> ... because you shouldn't have modified that file?
>> https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/#modifying-existing-systemd-services
>>
>
> Thanks for that link!
>
> I'm having to modify service configuration as well due to fairly 
> outdated hardware where clamd loads about 3 minutes.
>
> Probably ought to bugrep it to Fedora/CentOS etc.
>
> Thanks,
> Reio
>
> _______________________________________________
>
> clamav-users mailing list
> clamav-users at lists.clamav.net
> https://lists.clamav.net/mailman/listinfo/clamav-users
>
>
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
>
> http://www.clamav.net/contact.html#ml

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clamav.net/pipermail/clamav-users/attachments/20190826/84666640/attachment.html>


More information about the clamav-users mailing list