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")
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)