systemd / active (exited)

Helmut Schneider jumper99 at gmx.de
Mon Sep 2 18:03:07 UTC 2019


Helmut Schneider wrote:

> what do I have to do that systemd shows correctly if a daemon is
> running or not?
> 
> helmut at h2786452:~$ sudo /etc/init.d/clamav-daemon-chroot status; echo
> $?  _ clamav-daemon-chroot.service - LSB: ClamAV daemon
>    Loaded: loaded (/etc/init.d/clamav-daemon-chroot; bad; vendor
> preset: enabled)
>    Active: active (exited) since Thu 2019-08-29 12:33:49 CEST; 1h
> 23min ago
>      Docs: man:systemd-sysv-generator(8)
> 
> Aug 29 12:32:58 h2786452 clamav-daemon-chroot[8654]:  * Starting
> ClamAV daemon...
> Aug 29 12:33:49 h2786452 clamav-daemon-chroot[8654]:  * ClamAV daemon
> is now up and ...!
> Hint: Some lines were ellipsized, use -l to show in full.
> 0
> helmut at h2786452:~$

Thanks to all, works now like a charm now. Will do some tweaking but
you helped me to break some seals!

---

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

[Service]
User=amavis
Group=amavis
RootDirectory=/var/amavis
ExecStart=/usr/sbin/clamd --config-file /etc/clamav/clamd.conf
--foreground=true
# Reload the database
ExecReload=/bin/kill -USR2 $MAINPID
StandardOutput=syslog

[Install]
WantedBy=multi-user.target

---

# This file is managed by Puppet, don't edit it by hand.
# All changes will be overwritten!

[Unit]
Description=ClamAV virus database updater
Documentation=man:freshclam(1) man:freshclam.conf(5)
https://www.clamav.net/documents
# If user wants it run from cron, don't start the daemon.
ConditionPathExists=!/etc/cron.d/clamav-freshclam

[Service]
User=amavis
Group=amavis
RootDirectory=/var/amavis
ExecStart=/usr/bin/freshclam -d --config-file
/etc/clamav/freshclam.conf --daemon-notify=/etc/clamav/clamd.conf
--foreground=true
StandardOutput=syslog

[Install]
WantedBy=multi-user.target





More information about the ubuntu-users mailing list