summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Foti <foti.giuseppe@gmail.com>2023-08-09 14:35:00 +0200
committerFlorian Schmaus <flow@gentoo.org>2023-08-11 11:07:54 +0200
commitfba99b102660e610da2181ba71a4d79c518d74d0 (patch)
tree3d9dcad3dffbbd2f5bccbe540f26f9589f70f2cf /net-analyzer/ospd-openvas
parentsci-libs/caffe2: build nvfuser for cuda users (diff)
downloadgentoo-fba99b102660e610da2181ba71a4d79c518d74d0.tar.gz
gentoo-fba99b102660e610da2181ba71a4d79c518d74d0.tar.bz2
gentoo-fba99b102660e610da2181ba71a4d79c518d74d0.zip
net-analyzer/ospd-openvas: fix OpenRC script
Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/32231 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-22.confd4
-rw-r--r--net-analyzer/ospd-openvas/files/ospd-openvas-22.initd16
-rw-r--r--net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r2.ebuild (renamed from net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r1.ebuild)2
3 files changed, 14 insertions, 8 deletions
diff --git a/net-analyzer/ospd-openvas/files/ospd-openvas-22.confd b/net-analyzer/ospd-openvas/files/ospd-openvas-22.confd
new file mode 100644
index 000000000000..dbe9d762dae0
--- /dev/null
+++ b/net-analyzer/ospd-openvas/files/ospd-openvas-22.confd
@@ -0,0 +1,4 @@
+# OpenVAS Scanner command args
+
+# e.g --foreground
+OSPD_OPENVAS_OPTIONS=""
diff --git a/net-analyzer/ospd-openvas/files/ospd-openvas-22.initd b/net-analyzer/ospd-openvas/files/ospd-openvas-22.initd
index f43f75802729..7c79d85d8e1f 100644
--- a/net-analyzer/ospd-openvas/files/ospd-openvas-22.initd
+++ b/net-analyzer/ospd-openvas/files/ospd-openvas-22.initd
@@ -1,15 +1,17 @@
#!/sbin/openrc-run
-# Copyright 2020 Gentoo Authors
+# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+: ${GVM_USER:=gvm}
+: ${GVM_GROUP:=$(id -ng ${GVM_USER})}
+: ${OSPD_TIMEOUT:=30}
+
name="remotely control an OpenVAS Scanner"
command=/usr/bin/ospd-openvas
-pidfile="/run/${RC_SVCNAME}.pid"
+command_user="${GVM_USER}:${GVM_GROUP}"
command_args="${OSPD_OPENVAS_OPTIONS} \
- ${OSPD_OPENVAS_UNIX_SOCKET} \
- ${OSPD_OPENVAS_SOCKET_MODE} \
- --pid-file ${pidfile} \
- --config /etc/openvas/ospd.conf"
+ --config /etc/gvm/ospd-openvas.conf"
+retry="${OSPD_TIMEOUT}"
depend() {
after bootmisc
@@ -17,5 +19,5 @@ depend() {
}
start_pre() {
- checkpath -d /var/run/ospd
+ checkpath -d --owner ${GVM_USER} /var/run/ospd
}
diff --git a/net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r1.ebuild b/net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r2.ebuild
index f7a5adb87543..2dd5709b8761 100644
--- a/net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r1.ebuild
+++ b/net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r2.ebuild
@@ -56,7 +56,7 @@ python_install() {
fi
newinitd "${FILESDIR}/${PN}-22.initd" "${PN}"
- newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ newconfd "${FILESDIR}/${PN}-22.confd" "${PN}"
systemd_dounit config/${PN}.service