Package: apt-cacher-ng
Version: 0.8.0-1
Severity: normal
Tags: patch

Dear Maintainer,

The current /etc/logrotate.d/apt-cacher-ng only works
100% as expected under Sysvinit.

Under systemd, PID files are not needed, so
/var/run/apt-cacher-ng/pid doesn't exist.

I provided a patch in attachment to make it work with systemd.

Alexandre Detiste

(In short:
systemctl is-active apt-cacher-ng && systemctl kill --signal=USR1 apt-cacher-
ng)



-- Package-specific info:

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable'), (110, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/6 CPU cores)
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apt-cacher-ng depends on:
ii  adduser                3.113+nmu3
ii  debconf [debconf-2.0]  1.5.53
ii  dpkg                   1.17.21
ii  init-system-helpers    1.22
ii  libbz2-1.0             1.0.6-7+b1
ii  libc6                  2.19-13
ii  libgcc1                1:4.9.1-19
ii  liblzma5               5.1.1alpha+20120614-2+b1
ii  libssl1.0.0            1.0.1j-1
ii  libstdc++6             4.9.1-19
ii  libsystemd0            215-6
ii  libwrap0               7.6.q-25
ii  zlib1g                 1:1.2.8.dfsg-2

Versions of packages apt-cacher-ng recommends:
ii  ed  1.10-2

Versions of packages apt-cacher-ng suggests:
pn  avahi-daemon  <none>
ii  curl          7.38.0-3
pn  doc-base      <none>
ii  libfuse2      2.9.3-15+b1
ii  wget          1.16-3

-- Configuration Files:
/etc/apt-cacher-ng/security.conf [Errno 13] Permission non accordée: 
u'/etc/apt-cacher-ng/security.conf'
/etc/cron.daily/apt-cacher-ng changed [not included]

-- debconf information excluded
--- /etc/logrotate.d/apt-cacher-ng	2014-03-22 15:08:53.000000000 +0100
+++ apt-cacher-ng	2014-11-26 21:50:43.446950621 +0100
@@ -11,6 +11,9 @@
                 if [ -s /var/run/apt-cacher-ng/pid ] ; then
                         kill -s USR1 "$(cat /var/run/apt-cacher-ng/pid)"
                 fi
+                if [ -e /run/systemd/system ] ; then
+                        systemctl is-active apt-cacher-ng && systemctl kill --signal=USR1 apt-cacher-ng
+                fi
         endscript
 }
 
@@ -27,6 +30,9 @@
                 if [ -s /var/run/apt-cacher-ng/pid ] ; then
                         kill -s USR1 "$(cat /var/run/apt-cacher-ng/pid)"
                 fi
+                if [ -e /run/systemd/system ] ; then
+                        systemctl is-active apt-cacher-ng && systemctl kill --signal=USR1 apt-cacher-ng
+                fi
         endscript
 }
 

Reply via email to