Package: prosody
Version: 0.9.4-1~wheezy1
Severity: minor
Tags: patch

Dear Maintainer,
*** Please consider answering these questions, where appropriate ***

   * What led up to the situation?
        Turn of prosody and let cron do his daily logrotation. It triggers an 
error mail,
        because the postrotate includes a reload of prosody. So, because the 
daemon is off,
        the logrotation exits with 1 and triggers a cron error-mail like

-------------
From: root@jabber-dev (Cron Daemon)
To: root@jabber-dev
Subject: Cron <root@jabber-dev> test -x /usr/sbin/anacron || ( cd / && 
run-parts --report /etc/cron.daily )
Date: Wed,  1 Oct 2014 06:25:55 +0200 (CEST)

/etc/cron.daily/logrotate:
error: error running shared postrotate script for '/var/log/prosody/prosody.log 
/var/log/prosody/prosody.err '
run-parts: /etc/cron.daily/logrotate exited with return code 1
-------------

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
        Turn off prosody
   * What was the outcome of this action?
        An error-mail from cron came in
   * What outcome did you expect instead?
        The logrotate script should check whether the pid-file of prosody 
exists and reload only in case the file exist


proposal:

diff --git a/debian/prosody.logrotate b/debian/prosody.logrotate
index a4d6957..c13ccd7 100644
--- a/debian/prosody.logrotate
+++ b/debian/prosody.logrotate
@@ -5,7 +5,7 @@
        delaycompress
        create 640 prosody adm
        postrotate
-               /etc/init.d/prosody reload > /dev/null
+               [ -e /var/run/prosody/prosody.pid ] && /etc/init.d/prosody 
reload > /dev/null
        endscript
        sharedscripts
        missingok




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

Kernel: Linux 3.2.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


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to