]> git.openstreetmap.org Git - chef.git/commitdiff
tile: send replicate logs to systemd journald
authorGrant Slater <github@firefishy.com>
Tue, 17 Jan 2023 14:59:31 +0000 (14:59 +0000)
committerGrant Slater <github@firefishy.com>
Tue, 17 Jan 2023 14:59:31 +0000 (14:59 +0000)
cookbooks/tile/recipes/default.rb
cookbooks/tile/templates/default/replicate.erb
cookbooks/tile/templates/default/replicate.logrotate.erb [deleted file]

index d1a394b2f8b4532b1d569a0e25ea128fe85aa241..9f82536e62cd853c8ca6b6fa344a15a4c82c4a44 100644 (file)
@@ -645,11 +645,9 @@ service "replicate" do
   subscribes :restart, "systemd_service[replicate]"
 end
 
-template "/etc/logrotate.d/replicate" do
-  source "replicate.logrotate.erb"
-  owner "root"
-  group "root"
-  mode "644"
+# FIXME: cleanup old replicate logrotate
+file "/etc/logrotate.d/replicate" do
+  action :delete
 end
 
 template "/usr/local/bin/render-lowzoom" do
index eedf4e5763d3badfc71771166481074bfc6de7a8..ea0e100cf46e7fe14c423f4f8c3442e5a3208913 100644 (file)
@@ -12,9 +12,6 @@ function onexit {
     [ -f sequence-prev.txt ] && mv sequence-prev.txt sequence.txt
 }
 
-# Send output to the log
-exec > /var/log/tile/replicate.log 2>&1
-
 # Change to the replication state directory
 cd /var/lib/replicate
 
diff --git a/cookbooks/tile/templates/default/replicate.logrotate.erb b/cookbooks/tile/templates/default/replicate.logrotate.erb
deleted file mode 100644 (file)
index 9c2c29f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-# DO NOT EDIT - This file is being maintained by Chef
-
-/var/log/tile/replicate.log {
-  compress
-  delaycompress
-  notifempty
-  postrotate
-    /bin/systemctl try-restart replicate
-  endscript
-}