Package: privoxy
Version: 3.0.21-7
Severity: wishlist

Dear Maintainer,

A system with privoxy, systemd, and logcheck installed produces the
following syslog output during log rotation, which in turn triggers
logcheck email:

  Apr 26 06:52:58 hostname systemd[1]: privoxy.service: main process exited, 
code=exited, status=15/n/a

Upon closer examiniation I see that privoxy installs a signal handler
which exits with code assigned from the signal number.  Adding the
following systemd.service parameter keeps systemd (and logcheck) quiet
(as well opens the possiblity of instrumenting Restart=on-failure
correctly):

  SuccessExitStatus=15

Furthermore I found that privoxy supports reloading via SIGHUP which
re-opens it's logfile, which the LSB init script already supports, but
neither the logrotate.conf or systemd.service utilize.  The following
systemd.service parameter enables reload:

  ExecReload=/bin/kill -HUP $MAINPID

Combined with changing /etc/logrotate.d/privoxy to call 'reload' instead
of 'restart'.

See attached /etc/systemd/system/privoxy.service and
/etc/logrotate.d/privoxy files.

Thanks!

-- System Information:
Debian Release: 8.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

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

Versions of packages privoxy depends on:
ii  adduser              3.113+nmu3
ii  init-system-helpers  1.22
ii  initscripts          2.88dsf-59
ii  libc6                2.19-18
ii  libpcre3             2:8.35-3.3
ii  logrotate            3.8.7-1+b1
ii  lsb-base             4.1+Debian13+nmu1
ii  perl                 5.20.2-3
ii  zlib1g               1:1.2.8.dfsg-2+b1

Versions of packages privoxy recommends:
pn  doc-base  <none>

privoxy suggests no packages.

-- Configuration Files:
/etc/logrotate.d/privoxy changed [not included]
/etc/privoxy/config changed [not included]

-- no debconf information

-- 
Gerald Turner <[email protected]>        Encrypted mail preferred!
OpenPGP: 4096R / CA89 B27A 30FA 66C5 1B80  3858 EC94 2276 FDB8 716D
[Unit]
Description=Privacy enhancing HTTP Proxy

[Service]
Environment=PIDFILE=/var/run/privoxy.pid
Environment=OWNER=privoxy
Environment=CONFIGFILE=/etc/privoxy/config
Type=forking
PIDFile=/var/run/privoxy.pid
ExecStart=/usr/sbin/privoxy --pidfile $PIDFILE --user $OWNER $CONFIGFILE
ExecStopPost=/bin/rm -f $PIDFILE
ExecReload=/bin/kill -HUP $MAINPID
SuccessExitStatus=15

[Install]
WantedBy=multi-user.target
/var/log/privoxy/logfile /var/log/privoxy/jarfile /var/log/privoxy/errorfile {
        create 0640 privoxy adm
        missingok
        weekly
        rotate 7
        compress
        sharedscripts
        postrotate
                if [ -x /usr/sbin/invoke-rc.d ]; then
                        invoke-rc.d privoxy reload > /dev/null
                else
                        if [ -f /var/run/privoxy.pid ]; then
                                /etc/init.d/privoxy reload > /dev/null
                        fi
                fi
        endscript
}

Attachment: signature.asc
Description: PGP signature

Reply via email to