Rotate letsencrypt logs
authorTom Hughes <tom@compton.nu>
Tue, 3 Nov 2020 14:41:18 +0000 (14:41 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 3 Nov 2020 14:41:18 +0000 (14:41 +0000)
cookbooks/letsencrypt/recipes/default.rb
cookbooks/letsencrypt/templates/default/logrotate.erb [new file with mode: 0644]

index 3590fc94d106b7f2160687c5068d52dffad62f98..c41732cf64bf28db7815c6a16b1cee68703aa325 100644 (file)
@@ -190,3 +190,10 @@ cron_d "letencrypt-check" do
   command "/srv/acme.openstreetmap.org/bin/check-certificates"
   mailto "admins@openstreetmap.org"
 end
+
+template "/etc/logrotate.d/letsencrypt" do
+  source "logrotate.erb"
+  owner "root"
+  group "root"
+  mode "644"
+end
diff --git a/cookbooks/letsencrypt/templates/default/logrotate.erb b/cookbooks/letsencrypt/templates/default/logrotate.erb
new file mode 100644 (file)
index 0000000..57fe6d6
--- /dev/null
@@ -0,0 +1,6 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+/srv/acme.openstreetmap.org/logs/*.log {
+    missingok
+    compress
+}