From 9926f6cf33e0e2d1fdbf7cfefd0ced11a2b60296 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Tue, 17 Jan 2023 14:59:31 +0000 Subject: [PATCH] tile: send replicate logs to systemd journald --- cookbooks/tile/recipes/default.rb | 8 +++----- cookbooks/tile/templates/default/replicate.erb | 3 --- .../tile/templates/default/replicate.logrotate.erb | 10 ---------- 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 cookbooks/tile/templates/default/replicate.logrotate.erb diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index d1a394b2f..9f82536e6 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -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 diff --git a/cookbooks/tile/templates/default/replicate.erb b/cookbooks/tile/templates/default/replicate.erb index eedf4e576..ea0e100cf 100644 --- a/cookbooks/tile/templates/default/replicate.erb +++ b/cookbooks/tile/templates/default/replicate.erb @@ -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 index 9c2c29f22..000000000 --- a/cookbooks/tile/templates/default/replicate.logrotate.erb +++ /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 -} -- 2.39.5