I'm learning some bash scripting and started by creating a basic server health monitoring script that redirects the output to /var/log/serverhealth/
Now I want to manage the archiving with logrotate. It's working but I'd like to implement a few minor tweaks.
I've configured a file called serverhealth and placed in /etc/logrotate.d/
Code:
/var/log/serverhealth/*.log {
rotate 10
monthly
compress
}
So when I check the folder I see my compressed logs along with the corresponding uncompressed logs. How do I configure to delete the original file post compression?