You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a process that can run for 1-2 days and want to rotate its logfiles usign logrotate. However, the logfiles MUST NOT be rotated while that process is running and it cannot be signalled or stopped intermediately. So a colleague implemented a config file similar to this:
So the idea is to check for the process in question and return an error if it is running to make logrotate skip this partiular rotation.
This works, but everytime the process is found running firstaction will return an error and logroate will inform us via mail (from cron) like this:
/etc/cron.daily/logrotate:
error: error running first action script for /var/log/logfile
As there's no need to send a mail in that case we are wondering if there's a way to silently (= no mail) skip rotation? If not consider this a feature request ;-)
Update: fixed missing quote
The text was updated successfully, but these errors were encountered:
We have a process that can run for 1-2 days and want to rotate its logfiles usign logrotate. However, the logfiles MUST NOT be rotated while that process is running and it cannot be signalled or stopped intermediately. So a colleague implemented a config file similar to this:
So the idea is to check for the process in question and return an error if it is running to make logrotate skip this partiular rotation.
This works, but everytime the process is found running firstaction will return an error and logroate will inform us via mail (from cron) like this:
As there's no need to send a mail in that case we are wondering if there's a way to silently (= no mail) skip rotation? If not consider this a feature request ;-)
Update: fixed missing quote
The text was updated successfully, but these errors were encountered: