Log Rotation Frequency ver 10.1.2

@pb66

This response does not yet take into account yr latest 2 responses.

I changed CUSTOM_pb66~~~~~~ to the second of yr 3 suggested alternatives …

#!/bin/sh

test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate -v -s /var/log/logrotate/logrotate.status /etc/logrotate.conf >> /var/log/logrotate/logrotate.log 2>&1

This has worked a treat - no email at 19:17 and both logrotate.status and logrotate.log have been updated.
So I now have a solution albeit ‘Heath Robinson’.

I’ll now look to improving it with yr latest suggestions

Many thx

That’s interesting! Although I did say “or maybe even this would be better” at the time of posting, a couple of posts later I did state a preference to the 2nd suggestion

I don’t know why it might yield different results and don’t really have the time to investigate further right now, but I much prefer portable code, it potentially avoids quirks such as this.

@pb66
@TrystanLea

I did an update - the version did not change from 10.1.6 tho’.
I did NOT do the special sym link.

At 21:17 I did NOT receive an email :slight_smile: but I can see from logrotate.log that a logrotation did happen :slight_smile:

It’s been a linux learning experience for me and in particular … know who you are and where you are before you do stuff.

Many thx

1 Like