Logrotate stops when the file is missing.
I am forcing logrotate utility to execute. But it stops immediately after a file was missing. Actually logrotate should run with warning. Any idea on this?
|
if you check the standard logrotate docs like "man logrotate.conf" you'll see the missingok option, which is probably what you want here.
|
Thanks for the reply Chris...
Below are the different configurations of the same file. Actually test folder is not present. My intention is to logrotate will rotate even the file/not directory is not present. /opt/sample/test/var/log/std_out.log /opt/sample/test/var/log/std_err.log{ rotate 5 daily missingok notifempty compress sharedscripts postrotate /bin/kill -HUP `cat /opt/UMC/sae/var/run/daemon.pid 2> /dev/null` 2> /dev/null || true endscript } After rotating forcibly logrotate skips the config and continues execution. But logrotate stops when i will give wild characters in the place of std_out /opt/sample/test/var/log/std_*.log{ rotate 5 daily missingok notifempty compress sharedscripts postrotate /bin/kill -HUP `cat /opt/UMC/sae/var/run/daemon.pid 2> /dev/null` 2> /dev/null || true endscript } ie) if will mention all the files individually logrotate continues execution but it stops when i use std_*.log in the place of stdout. Can you please help in this? |
Latest revision has a fix
Rev: logroatate-3.7.4-r-12. |
All times are GMT -5. The time now is 05:22 PM. |