]> git.proxmox.com Git - pmg-api.git/commitdiff
Add logrotate config for pmgproxy.log
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 24 Apr 2020 10:06:28 +0000 (12:06 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 24 Apr 2020 11:35:45 +0000 (13:35 +0200)
to keep the log from growing without end. Rotate monthly and keep 12 logs,
since the logs should not be too large (e.g. a productive instance, with
~20 users using the quarantine and some configuration changes amounts to
108M over 2.5 years)

the logrotate snippet is placed in /etc/logrotate.d/pmg-api by
dh_installlogrotate(1).

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
debian/pmg-api.logrotate [new file with mode: 0644]

diff --git a/debian/pmg-api.logrotate b/debian/pmg-api.logrotate
new file mode 100644 (file)
index 0000000..b11e1c0
--- /dev/null
@@ -0,0 +1,13 @@
+/var/log/pmgproxy/pmgproxy.log {
+       rotate 12
+       monthly
+       missingok
+       compress
+       delaycompress
+       notifempty
+       create 640 www-data www-data
+       sharedscripts
+       postrotate
+               /bin/systemctl try-reload-or-restart pmgproxy.service
+       endscript
+}