mythtv logfiles, and reload command

Página superior

Responder a este mensaje
Autor: Ariel
Fecha:  
A: dmo-discussion
Asunto: mythtv logfiles, and reload command

In the logfile rotation script for mythtv-backend it uses copytruncate
which is less than ideal.

I just found out that that if you send mythtv-backup the HUP signal it
closes and reopens its logfile. (I tested it, it works.)

Can you add a reload command to the init.d script?

start-stop-daemon --stop --oknodo --signal 1 --pidfile $RUNDIR/$NAME.pid --chuid $USER --exec $DAEMON -- $ARGS

Then remove copytruncate from /etc/logrotate.d/mythtv-backend, and add:

delaycompress
postrotate
/etc/init.d/mythtv-backend reload > /dev/null
endscript

(Maybe use invoke-rc.d instead of calling the script directly.)

Thanks,
     -Ariel