Update npm_install.py
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user