Followed instructions on how to custimize an existing systemd service:

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

2) Created new file /etc/systemd/system/clamd@.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@scan.service reports an error:
Warning: The unit file, source configuration file or drop-ins of clamd@scan.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● clamd@scan.service - Customized clamd scanner (scan) daemon
   Loaded: bad-setting (Reason: Unit clamd@scan.service has a bad unit file setting.)
  Drop-In: /etc/systemd/system/clamd@.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@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@lists.clamav.net <mailto:clamav-users@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@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

_______________________________________________

clamav-users mailing list
clamav-users@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

Reply via email to