Package: rspamd
Version: 1.8.1-2+b2
Severity: normal
Tags: patch

Dear Maintainer,

The logrotate script /etc/logrotate.d/rspamd makes the log rotate and then:
    service rspamd reopenlog >/dev/null 2>&1 || true

Unfortunately, for the non-standard action reopenlog, /usr/sbin/service uses
the SysVinit script which does:
    start-stop-daemon --stop --signal 10 --quiet --pidfile $PIDFILE

If I do this, I get:
    $ sudo start-stop-daemon --stop --signal 10 --pidfile /run/rspamd/rspamd.pid
    No process in pidfile '/run/rspamd/rspamd.pid' found running; none killed.

And rspamd continues to write to the rotated logfile
/var/log/rspamd/rspamd.log.1 .

The following is one way to fix this. Another way would be to update the systemd
service file to create a PID file.

--- rspamd-1.8.1/debian/rspamd.logrotate        2018-11-10 22:58:51.000000000 
+0100
+++ rspamd-1.8.1.new/debian/rspamd.logrotate    2019-01-19 17:18:17.693282920 
+0100
@@ -6,7 +6,7 @@
        notifempty
        missingok
        postrotate
-          service rspamd reopenlog >/dev/null 2>&1 || true
+          systemctl kill --signal=SIGUSR1 rspamd >/dev/null 2>&1 \
+             || service rspamd reopenlog >/dev/null 2>&1 || true
        endscript
 }


Thanks,

Alex

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), 
LANGUAGE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages rspamd depends on:
ii  adduser          3.118
ii  ca-certificates  20180409
ii  libc6            2.28-5
ii  libevent-2.1-6   2.1.8-stable-4
ii  libglib2.0-0     2.58.2-4
ii  libicu63         63.1-5
pn  libjemalloc2     <none>
ii  libjs-bootstrap  3.4.0+dfsg-1
pn  libjs-d3         <none>
ii  libjs-jquery     3.2.1-1
pn  libjs-requirejs  <none>
pn  libluajit-5.1-2  <none>
ii  libmagic1        1:5.35-2
ii  libpcre2-8-0     10.32-3
ii  libsqlite3-0     3.26.0+fossilbc891ac6b-1
ii  libssl1.1        1.1.1a-1
ii  libunwind8       1.2.1-8
ii  lsb-base         10.2018112800
ii  zlib1g           1:1.2.11.dfsg-1

rspamd recommends no packages.

rspamd suggests no packages.

Reply via email to