Bug#849248: prosody: logrotate fails when prosody is not running (with fix)
Package: prosody Version: 0.9.7-2+deb8u3 This is a reply to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849248 . May I suggest this fix: # vi /etc/logrotate.d/prosody /var/log/prosody/prosody.log /var/log/prosody/prosody.err { weekly rotate 52 compress delaycompress create 640 prosody adm postrotate prosodyctl reload > /dev/null endscript sharedscripts missingok } To proof it is working: # logrotate -f /etc/logrotate.d/prosody # less /var/log/prosody/prosody.log.1 Jan 30 19:12:27 mod_posix infoReceived SIGHUP Jan 30 19:12:27 general infoReloading configuration file # less /var/log/prosody/prosody.log Jan 30 19:12:27 general infoRe-opening log files
Bug#849248: prosody: logrotate fails when prosody is not running (with fix)
Package: prosody Version: 0.9.7-2+deb8u3 Severity: normal Dear Maintainer, When prosody is not running, 'logrotate -f /etc/logrotate.conf' fails with Job for prosody.service failed. See 'systemctl status prosody.service' and 'journalctl -xn' for details. error: error running shared postrotate script for '/var/log/prosody.log /var/log/prosody.err' 'journalctl -xn' returns: systemd[1]: unit prosody.service cannot be reloaded because it is inactive. This is because /etc/logrotate.d/prosody does not check whether the service is running in the postrotate script. I solved the problem by modifying it as follows: postrotate if /etc/init.d/prosody status > /dev/null ; then \ /etc/init.d/prosody reload > /dev/null; \ fi; Debian stable + backports, amd64 Can this fix be applied to the prosody Debian package? Thanks