commit: fba99b102660e610da2181ba71a4d79c518d74d0 Author: Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com> AuthorDate: Wed Aug 9 12:35:00 2023 +0000 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> CommitDate: Fri Aug 11 09:07:54 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fba99b10
net-analyzer/ospd-openvas: fix OpenRC script Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/32231 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> net-analyzer/ospd-openvas/files/ospd-openvas-22.confd | 4 ++++ net-analyzer/ospd-openvas/files/ospd-openvas-22.initd | 16 +++++++++------- ...as-22.5.3-r1.ebuild => ospd-openvas-22.5.3-r2.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 similarity index 97% rename from net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r1.ebuild rename to 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
