Eu uso um arquivo de log falso "log.php", pois o CodeIgniter escreve arquivos de log com nomes de datas.
/home/boxu/website/html/protected/application/logs/log.php {
daily
rotate 31
missingok
notifempty
su boxu boxu
#create 640 boxu boxu
nocreate
nocompress
extension .php
dateext
dateformat -%Y-%m-%d
}
Esta pode ser a razão pela qual o logrotate sai com o código de retorno 1?
rotating pattern: /home/boxu/website/html/protected/application/logs/log.php after 1 days (31 rotations)
empty log files are not rotated, old logs are removed
considering log /home/boxu/website/html/protected/application/logs/log.php
log needs rotating
rotating log /home/boxu/website/html/protected/application/logs/log.php, log->rotateCount is 31
Converted ' -%Y-%m-%d' -> '-%Y-%m-%d'
dateext suffix '-2017-03-27'
glob pattern '-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]'
removing /home/boxu/website/html/protected/application/logs/log-2017-02-24.php
removing old log /home/boxu/website/html/protected/application/logs/log-2017-02-24.php
destination /home/boxu/website/html/protected/application/logs/log-2017-03-27.php already exists, skipping rotation
Eu suspeito da última linha. Isso é executado ao vivo com -v
Obrigado.