-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetar-logrotate.example
More file actions
43 lines (39 loc) · 921 Bytes
/
metar-logrotate.example
File metadata and controls
43 lines (39 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Logrotate configuration for Node METAR Map
# Install to: /etc/logrotate.d/node-metar-map
#
# Installation:
# sudo cp metar-logrotate.example /etc/logrotate.d/node-metar-map
# sudo chown root:root /etc/logrotate.d/node-metar-map
# sudo chmod 644 /etc/logrotate.d/node-metar-map
#
# Test rotation:
# sudo logrotate -v -f /etc/logrotate.d/node-metar-map
# METAR History Log
/home/pi/metar-history.log {
daily
rotate 30
compress
delaycompress
missingok
notifempty
create 644 pi pi
sharedscripts
# Optional: Run after rotation
# postrotate
# # No action needed - app appends to new file automatically
# endscript
}
# PM2 Logs (if using PM2)
/home/pi/nodeMetarMap/logs/*.log {
daily
rotate 7
compress
delaycompress
missingok
notifempty
create 644 pi pi
sharedscripts
postrotate
pm2 reloadLogs
endscript
}