From 34b7fd0b6864d20fd84ec7c5d868f8481f30b4b7 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Wed, 22 Nov 2017 12:59:19 -0600 Subject: [PATCH] add logrotate for cpan logs --- Rexfile | 7 +++++++ etc/logrotate-cpan.conf | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 etc/logrotate-cpan.conf diff --git a/Rexfile b/Rexfile index 7df37ab..1b19d8e 100644 --- a/Rexfile +++ b/Rexfile @@ -424,6 +424,13 @@ task prepare_cpan => Rex::Logger::info( 'Configuring Apache2' ); _deploy_group_sites( 'cpan' ); + Rex::Logger::info( 'Configuring logrotate' ); + file '/etc/logrotate.d/cpan', + source => 'etc/logrotate-cpan.conf', + owner => 'root', + group => 'root', + mode => 644, + ; }; }; diff --git a/etc/logrotate-cpan.conf b/etc/logrotate-cpan.conf new file mode 100644 index 0000000..401385d --- /dev/null +++ b/etc/logrotate-cpan.conf @@ -0,0 +1,7 @@ + +compress +minsize 10M +rotate 9 +notifempty + +/home/cpan/var/log/*.log { }