Dear all: my FreePBX Distro is executing logrotate at 3:11am and I can’t figure out how to change it, as it sounds more logical, to me at least, to have logrotate run at 0:00, so each logfile contains data for one day only. I read everywhere but couldn’t find how to modify the time when logrotate runs, I checked crontab but I don’t see an entry related to logrotate, at leats not from the names of the scripts. My asterisk logrotate configuration and crontab contents are below, I appreciate any help that you can provide.
[root@freepbx logrotate.d]# cat asterisk
/var/log/asterisk/queue_log {
daily
missingok
rotate 7
notifempty
sharedscripts
create 0640 asterisk asterisk
}
/var/log/asterisk/freepbx_dbug{
size 500M
missingok
rotate 7
notifempty
sharedscripts
create 0640 asterisk asterisk
}
/var/log/asterisk/prosody_debug.log
/var/log/asterisk/prosody.log
/var/log/asterisk/ucp_err.log
/var/log/asterisk/ucp_forever.log
/var/log/asterisk/ucp_out.log
/var/log/asterisk/freepbx_debug
/var/log/asterisk/freepbx.log {
daily
missingok
rotate 7
notifempty
create 0640 asterisk asterisk
}
/var/log/asterisk/freepbx_security.log {
size 100M
missingok
rotate 7
notifempty
sharedscripts
create 0640 asterisk asterisk
}
/var/spool/mail/asterisk
/var/log/asterisk/messages
/var/log/asterisk/event_log
/var/log/asterisk/full
/var/log/asterisk/dtmf
/var/log/asterisk/fail2ban {
daily
missingok
rotate 7
notifempty
sharedscripts
create 0640 asterisk asterisk
postrotate
/usr/sbin/asterisk -rx ‘logger reload’ > /dev/null 2> /dev/null
endscript
}
#This comment is to fix rpm file replacing
#Config file built on Fri Jul 22 22:35:02 UTC 2016
[asterisk@freepbx ~]$ crontab -l
20 * * * * /var/lib/asterisk/bin/freepbx-cron-scheduler.php
@daily [ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php
@daily [ -x /var/lib/asterisk/bin/freepbx_sipstation_check ] && /var/lib/asterisk/bin/freepbx_sipstation_check
-
-
-
-
- [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php
@monthly ID=freepbx_backup_1 /var/lib/asterisk/bin/backup.php --id=1
@daily [ -x /var/lib/asterisk/agi-bin/ddns_client.php ] && /var/lib/asterisk/agi-bin/ddns_client.php
@hourly [ -x /var/lib/asterisk/bin/storage.php ] && /var/lib/asterisk/bin/storage.php
30 * * * * /usr/sbin/fwconsole util cleanplaybackcache -q
- [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php
-
-
-
- 3 * * * /usr/sbin/fwconsole certificates updateall -q
@daily [ -x /var/lib/asterisk/agi-bin/update_license.php ] && /var/lib/asterisk/agi-bin/update_license.php --delay -
-
-
-
- [ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php
-
-
-