File: //etc/systemd/system/clamd.service
[Unit]
Description=clamd antivirus daemon
ConditionPathExists=!/etc/clamddisable
After=network-online.target
[Service]
Type=simple
TimeoutSec=300
EnvironmentFile=/etc/sysconfig/exim
ExecStart=/usr/local/cpanel/3rdparty/bin/clamd -F
# clamd does not create the directory holding its socket and PID file.
# Mode 0755 is required, not merely convenient: exim and every cPanel user
# running the Virus Scanner feature must be able to traverse this directory
# to reach the socket.
RuntimeDirectory=clamav
RuntimeDirectoryMode=0755
# monitor and restart service similar to tailwatchd
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target