mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 23:47:14 -08:00
net-analyzer/notus-scanner: Adds a check on log's dir owner and the logfile to logrotate
Closes: https://bugs.gentoo.org/937564 Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com> Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Copyright 1999-2024 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/notus-scanner.log {
|
||||
compress
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
copytruncate
|
||||
maxsize 10M
|
||||
}
|
||||
+11
-1
@@ -20,7 +20,7 @@ DEPEND="
|
||||
net-libs/paho-mqtt-c
|
||||
>=dev-python/psutil-5.9[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-gnupg-0.5.1[${PYTHON_USEDEP}]
|
||||
<dev-python/packaging-24.1[${PYTHON_USEDEP}]
|
||||
<dev-python/packaging-24.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/paho-mqtt-1.5.1[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
<dev-python/tomli-3[${PYTHON_USEDEP}]
|
||||
@@ -69,6 +69,16 @@ python_install() {
|
||||
fowners -R gvm:gvm /var/lib/notus
|
||||
fi
|
||||
|
||||
# Adding notus-scanner.log to logrotate
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/${PN}.logrotate" "${PN}"
|
||||
|
||||
# Set proper permissions on required files/directories
|
||||
keepdir /var/log/gvm
|
||||
if ! use prefix; then
|
||||
fowners -R gvm:gvm /var/log/gvm
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
|
||||
|
||||
systemd_dounit config/${PN}.service
|
||||
Reference in New Issue
Block a user