diff --git a/npm_install.py b/npm_install.py index f4e4248..164d532 100644 --- a/npm_install.py +++ b/npm_install.py @@ -1004,17 +1004,21 @@ def strip_ipv6_listens(paths): f.write_text(new, encoding="utf-8") def install_logrotate_for_data_logs(): - with step("Installing logrotate policy for /data/logs (*.log), keep 7 rotations"): - conf_path = Path("/etc/logrotate.d/npm-data-logs") - content = """/data/logs/*.log { + with step("Installing logrotate policy for /var/log/angie (*.log)"): + conf_path = Path("/etc/logrotate.d/angie") + content = """/var/log/angie/*.log { daily - rotate 7 + rotate 1 compress - delaycompress missingok notifempty copytruncate create 0640 root root + postrotate + if [ -f /run/angie.pid ]; then + kill -USR1 $(cat /run/angie.pid) + fi + endscript } """ write_file(conf_path, content, 0o644)