What command(s) are you using to start the service?

# systemctl start  clamav-daemon.service


On 7/23/2018 9:34 PM, ChandranManikandan wrote:
Hi Eric,

Thank you for your support.

I have checked your above steps and files with the path.

All are configure well except this line Restart = on-failure on  /usr/lib/systemd/system/clamav-daemon.service

I have added this line in that file then after that try to restart the clamd.
But no luck to start that. The below message come

Failed to restart clamd.service: Unit not found.

What may cause this package?
Could you help me to fix this issue.
Is this issue only for me or around the world whom are using the COS7.

Thank you.


On Mon, Jul 23, 2018 at 8:21 PM, Eric Broch <ebr...@whitehorsetc.com <mailto:ebr...@whitehorsetc.com>> wrote:

    Do these files exist:

    /usr/lib/systemd/system/clamav-daemon.service
    /usr/lib/systemd/system/clamav-daemon.socket

    and these links:

    /etc/systemd/system/multi-user.target.wants/clamav-daemon.service
    /etc/systemd/system/sockets.target.wants/clamav-daemon.socket


    # cat /usr/lib/systemd/system/clamav-daemon.service
    [Unit]
    Description=Clam AntiVirus userspace daemon
    Documentation=man:clamd(8) man:clamd.conf(5)
    https://www.clamav.net/documents/ <https://www.clamav.net/documents/>
    Requires=clamav-daemon.socket
    # Check for database existence
    ConditionPathExistsGlob=/var/lib/clamav/main.{c[vl]d,inc}
    ConditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc}

    [Service]
    ExecStart=/usr/sbin/clamd --foreground=true
    # Reload the database
    ExecReload=/bin/kill -USR2 $MAINPID
    StandardOutput=syslog
    Restart = on-failure

    [Install]
    WantedBy=multi-user.target
    Also=clamav-daemon.socket


    # cat /usr/lib/systemd/system/clamav-daemon.socket
    [Unit]
    Description=Socket for Clam AntiVirus userspace daemon
    Documentation=man:clamd(8) man:clamd.conf(5)
    https://www.clamav.net/documents/ <https://www.clamav.net/documents/>
    # Check for database existence
    ConditionPathExistsGlob=/var/lib/clamav/main.{c[vl]d,inc}
    ConditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc}

    [Socket]
    ListenStream=/run/clamav/clamd.ctl
    #ListenStream=127.0.0.1:1024 <http://127.0.0.1:1024>
    SocketUser=clamav
    SocketGroup=clamav
    RemoveOnStop=True

    [Install]
    WantedBy=sockets.target

    # ls -l
    /etc/systemd/system/multi-user.target.wants/clamav-daemon.service
    lrwxrwxrwx 1 root root 45 Jan 30 05:44
    /etc/systemd/system/multi-user.target.wants/clamav-daemon.service
    -> /usr/lib/systemd/system/clamav-daemon.service
    # ls -l /etc/systemd/system/sockets.target.wants/clamav-daemon.socket
    lrwxrwxrwx 1 root root 44 Jan 30 05:44
    /etc/systemd/system/sockets.target.wants/clamav-daemon.socket ->
    /usr/lib/systemd/system/clamav-daemon.socket





    On 7/22/2018 9:19 PM, ChandranManikandan wrote:
    Hi Friends,

    Clamav was installed on my Centos7 and freshclam command also
    running well.
    But clamav service is not running.

    when i try this command systemctl status clamd below message come.

     Unit clamd.service could not be found.

    User permission everything is okay and package also was installed.
    clamav-0.100.0-4.qt.el7.x86_64

    Could you let me know what is the causes in this server and how
    to fix it.

-- */Thanks & Best Regards,
    Manikandan.C
    /*

-- Eric Broch
    White Horse Technical Consulting (WHTC)




--
*/Thanks & Best Regards,
Manikandan.C
/*

--
Eric Broch
White Horse Technical Consulting (WHTC)

Reply via email to