summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Foti <foti.giuseppe@gmail.com>2023-07-30 12:14:59 +0200
committerFlorian Schmaus <flow@gentoo.org>2023-07-31 11:12:45 +0200
commit3ad9fc84678925ef3ba06623dfc34503d4276874 (patch)
tree0e84a0388dd71d4596a50d235623269816351748 /net-analyzer/ospd-openvas
parentnet-analyzer/gvmd: add 22.6.0 (diff)
downloadgentoo-3ad9fc84678925ef3ba06623dfc34503d4276874.tar.gz
gentoo-3ad9fc84678925ef3ba06623dfc34503d4276874.tar.bz2
gentoo-3ad9fc84678925ef3ba06623dfc34503d4276874.zip
net-analyzer/ospd-openvas: add ospd-opevas.log to logrotate
Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/32102 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'net-analyzer/ospd-openvas')
-rw-r--r--net-analyzer/ospd-openvas/files/ospd-openvas.logrotate13
-rw-r--r--net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r1.ebuild (renamed from net-analyzer/ospd-openvas/ospd-openvas-22.5.3.ebuild)3
2 files changed, 16 insertions, 0 deletions
diff --git a/net-analyzer/ospd-openvas/files/ospd-openvas.logrotate b/net-analyzer/ospd-openvas/files/ospd-openvas.logrotate
new file mode 100644
index 000000000000..7fed1aa23437
--- /dev/null
+++ b/net-analyzer/ospd-openvas/files/ospd-openvas.logrotate
@@ -0,0 +1,13 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# Daemon ignore HUP so we use 'copytruncate' instead of 'create'
+# with safe file size to prevent losing log entries.
+
+/var/log/gvm/ospd-openvas.log {
+ compress
+ missingok
+ notifempty
+ sharedscripts
+ copytruncate
+ maxsize 10M
+}
diff --git a/net-analyzer/ospd-openvas/ospd-openvas-22.5.3.ebuild b/net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r1.ebuild
index 5aa80f75d415..f7a5adb87543 100644
--- a/net-analyzer/ospd-openvas/ospd-openvas-22.5.3.ebuild
+++ b/net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r1.ebuild
@@ -68,6 +68,9 @@ python_install() {
${PN}.service
fi
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/ospd-openvas.logrotate" ospd-openvas
+
# OSPD OpenVAS attempts to call openvas via sudo as network security
# scanning often requires priviliged operations.
insinto /etc/sudoers.d