Update npm_install.py

This commit is contained in:
gru
2025-10-25 10:04:14 +02:00
parent b8c94cf17c
commit b2183639af

View File

@@ -1004,17 +1004,21 @@ def strip_ipv6_listens(paths):
f.write_text(new, encoding="utf-8") f.write_text(new, encoding="utf-8")
def install_logrotate_for_data_logs(): def install_logrotate_for_data_logs():
with step("Installing logrotate policy for /data/logs (*.log), keep 7 rotations"): with step("Installing logrotate policy for /var/log/angie (*.log)"):
conf_path = Path("/etc/logrotate.d/npm-data-logs") conf_path = Path("/etc/logrotate.d/angie")
content = """/data/logs/*.log { content = """/var/log/angie/*.log {
daily daily
rotate 7 rotate 1
compress compress
delaycompress
missingok missingok
notifempty notifempty
copytruncate copytruncate
create 0640 root root 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) write_file(conf_path, content, 0o644)