Topic: initctl: invalid command: reopen-logs (fix?)
==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version: 0.90
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): both - or so it seems
- Linux/BSD distribution name and version: Ubuntu 14.04 LTS
- Related log if you're reporting an issue: /etc/cron.daily/logrotate
====
ERROR MESSAGE
/etc/cron.daily/logrotate:
Stopping iredapd ...
Starting iredapd ...
//relevant section//
initctl: invalid command: reopen-logs
Try `initctl --help' for more information.
invoke-rc.d: initscript php5-fpm, action "reopen-logs" failed.
error: error running non-shared postrotate script for /var/log/php5-fpm.log of '/var/log/php5-fpm.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1
/etc/cron.daily/tmpreaper:
Please read /usr/share/doc/tmpreaper/README.security.gz first;
edit /etc/tmpreaper.conf to remove this message (look for SHOWWARNING).
//end//
So the issue is "reopen-logs. Looking at the script
/etc/logrotate.d/php5-fpm
We see:
/var/log/php5-fpm.log {
rotate 12
weekly
missingok
notifempty
compress
delaycompress
postrotate
invoke-rc.d php5-fpm reopen-logs > /dev/null
endscript
}
I suggest the fix is to change 'reopen-logs' to 'restart'. It suppressed warning emails on my system.
Can anyone concur, OR suggest a different workaround?
Regards,
/.Mangler
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.