[Unit] Description=Clam AntiVirus userspace daemon in chroot Documentation=man:clamd(8) man:clamd.conf(5) https://www.clamav.net/documents/ #Requires=clamav-daemon-chroot.socket # Check for database existence ConditionPathExistsGlob=/chroot/maild/var/lib/clamav/main.{c[vl]d,inc} ConditionPathExistsGlob=/chroot/maild/var/lib/clamav/daily.{c[vl]d,inc} [Service] RootDirectory=/chroot/maild RootDirectoryStartOnly=no User=clamav Group=clamav #ExecStartPre=/sbin/paxctl -cm /chroot/maild/usr/sbin/clamd ExecStart=/usr/sbin/clamd --foreground=true -c /etc/clamav/clamd.conf # Reload the database ExecReload=/bin/kill -USR2 $MAINPID StandardOutput=syslog [Install] WantedBy=multi-user.target #Also=clamav-daemon-chroot.socket