fuel-library/deployment/puppet/osnailyfacter/templates/atop_retention.erb
Alex Schultz 95a6dc7cc7 Remove atop logrotate configuration
The previous logrotate configuration was improperly rotating the log
file which is not necessary due to the daily restart of atop. The
binary retention is now handled via a new atop retention cron. This
change removes the atop logrotate configuration.

Change-Id: I76e3c12b46946ed7c48719f51e953528708c2d4b
Closes-Bug: 1452389
2015-06-16 20:41:35 +00:00

12 lines
432 B
Plaintext

#!/bin/bash
# Managed by puppet
# This file manages the atop binary files. It will keep binary files for last
# <%= @rotate %> days instead of 30 days provided by atop.
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# remove files older than <%= @rotate %> days
find <%= @logpath %> -type f -name 'atop_*' -mtime +<%= @rotate %> -delete
# link current to todays file
ln -f -s <%= @logpath %>/atop_$(date +%Y%m%d) <%= @logpath %>/atop_current