I have a file under logrotate.d that I would like not to run when the main logrotate is running.
I have created a separate job for this in /etc/crontab
45 23 * * * root mv /var/log/RemoteSystems/*/*.log /var/log/Archiv/ && logrotate /etc/logrotate.d/test
The job will move the files from a directory to another and then will apply logrotate. I would like that this job to run separately from main logrotate job in /etc/crontab
. The problem is that because "test" is under /etc/logrotate.d/
, it will run once again with the main logrotate.
Is there any command that I can insert in logrotate.conf that can exclude "test" to run?
I know that if I am having "test" file out of /etc/logrotate.d
, this will not happen, but I would like to keep "test" at the same path.