From: Tom Hughes Date: Mon, 30 Mar 2015 08:00:24 +0000 (+0100) Subject: Delay compression of shorewall log files X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/6d24931ebf66ec9f5382a0fd9b12f766b77a912c?ds=inline Delay compression of shorewall log files --- diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index 5cb43e807..fe01c04e5 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -189,6 +189,14 @@ template "/etc/shorewall/rules" do notifies :restart, "service[shorewall]" end +template "/etc/logrotate.d/shorewall" do + source "logrotate.shorewall.erb" + owner "root" + group "root" + mode 0644 + variables :name => "shorewall" +end + firewall_rule "limit-icmp-echo" do action :accept family :inet @@ -294,6 +302,14 @@ unless node.interfaces(:family => :inet6).empty? notifies :restart, "service[shorewall6]" end + template "/etc/logrotate.d/shorewall6" do + source "logrotate.shorewall.erb" + owner "root" + group "root" + mode 0644 + variables :name => "shorewall6" + end + firewall_rule "limit-icmp6-echo" do action :accept family :inet6 diff --git a/cookbooks/networking/templates/default/logrotate.shorewall.erb b/cookbooks/networking/templates/default/logrotate.shorewall.erb new file mode 100644 index 000000000..c95ba7496 --- /dev/null +++ b/cookbooks/networking/templates/default/logrotate.shorewall.erb @@ -0,0 +1,10 @@ +# DO NOT EDIT - This file is being maintained by Chef + +/var/log/<%= @name %>-init.log { + weekly + rotate 4 + compress + delaycompress + missingok + create 0640 root adm +}