I've been wanting to figure out why I get error emails from my server when logrotate runs:
Code
/etc/cron.daily/logrotate:
Usage: /etc/init.d/rsyslog {start|stop|rotate|restart|force-reload|status}
invoke-rc.d: initscript rsyslog, action "reload" failed.
error: error running shared postrotate script for '/var/log/transmissionbt.log
As you can see, on postrotate it calls rsyslog to "reload". Upon inspection of /etc/init.d/rsyslog that is not a valid command.
When I look at /etc/init.d/transmission-daemon, I see the expected command of reload.
Code
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
*)
log_action_msg "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart|status}" || true
exit 2
;;
Accordingly, I have changed my /etc/logrotate.d/transmissionbt to:
Code
var/log/transmissionbt.log
{
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
invoke-rc.d transmission-daemon reload > /dev/null
endscript
}
Alles anzeigen
Is this the correct what it is supposed to go, or is something else causing issues here?