summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Licht <jonas.licht@fem.tu-ilmenau.de>2020-03-21 16:15:15 +0100
committerJoonas Niilola <juippis@gentoo.org>2020-03-25 15:45:27 +0200
commit34e2e746d9d0f2a1f84b57e0297416486b461ddc (patch)
tree8525c3f1273e0ac8d2a0d29aad28403dfce550e0 /net-analyzer/ospd-openvas/files
parentacct-group/gvm: overtake maintainership (diff)
downloadgentoo-34e2e746d9d0f2a1f84b57e0297416486b461ddc.tar.gz
gentoo-34e2e746d9d0f2a1f84b57e0297416486b461ddc.tar.bz2
gentoo-34e2e746d9d0f2a1f84b57e0297416486b461ddc.zip
net-analyzer/ospd-openvas: add new package
Bug: https://bugs.gentoo.org/713804 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Jonas Licht <jonas.licht@fem.tu-ilmenau.de> Closes: https://github.com/gentoo/gentoo/pull/14922 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-analyzer/ospd-openvas/files')
-rw-r--r--net-analyzer/ospd-openvas/files/ospd-openvas.confd10
-rw-r--r--net-analyzer/ospd-openvas/files/ospd-openvas.initd17
-rw-r--r--net-analyzer/ospd-openvas/files/ospd-openvas.service18
-rw-r--r--net-analyzer/ospd-openvas/files/ospd.conf10
-rw-r--r--net-analyzer/ospd-openvas/files/redis.conf.example57
5 files changed, 112 insertions, 0 deletions
diff --git a/net-analyzer/ospd-openvas/files/ospd-openvas.confd b/net-analyzer/ospd-openvas/files/ospd-openvas.confd
new file mode 100644
index 000000000000..fc776ac49e32
--- /dev/null
+++ b/net-analyzer/ospd-openvas/files/ospd-openvas.confd
@@ -0,0 +1,10 @@
+# OpenVAS Scanner command args
+
+# e.g --foreground
+OSPD_OPENVAS_OPTIONS=""
+
+# Scanner listen socket
+OSPD_OPENVAS_UNIX_SOCKET="--unix-socket=/tmp/ospd.sock"
+
+# Scanner listen mode
+OSPD_OPENVAS_SOCKET_MODE="--socket-mode=0o777"
diff --git a/net-analyzer/ospd-openvas/files/ospd-openvas.initd b/net-analyzer/ospd-openvas/files/ospd-openvas.initd
new file mode 100644
index 000000000000..ced28d892dcd
--- /dev/null
+++ b/net-analyzer/ospd-openvas/files/ospd-openvas.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="remotely control an OpenVAS Scanner"
+command=/usr/bin/ospd-openvas
+pidfile="/run/${RC_SVCNAME}.pid"
+command_args="${OSPD_OPENVAS_OPTIONS} \
+ ${OSPD_OPENVAS_UNIX_SOCKET} \
+ ${OSPD_OPENVAS_SOCKET_MODE} \
+ --pid-file ${pidfile} \
+ --config /etc/openvas/ospd.conf"
+
+depend() {
+ after bootmisc
+ need localmount redis
+}
diff --git a/net-analyzer/ospd-openvas/files/ospd-openvas.service b/net-analyzer/ospd-openvas/files/ospd-openvas.service
new file mode 100644
index 000000000000..f496797d54ff
--- /dev/null
+++ b/net-analyzer/ospd-openvas/files/ospd-openvas.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=OSPD OpenVAS
+After=network.target networking.service dnsmasq.service redis-server@openvas.service systemd-tmpfiles.service
+ConditionKernelCommandLine=!recovery
+
+[Service]
+Type=forking
+User=gvm
+Group=gvm
+ExecStart=/usr/bin/ospd-openvas --config /etc/openvas/ospd.conf --foreground
+SuccessExitStatus=SIGKILL
+# This works asynchronously, but does not take the daemon down during the reload so it's ok.
+Restart=always
+RestartSec=60
+
+[Install]
+WantedBy=multi-user.target
+Alias=ospd-openvas.service
diff --git a/net-analyzer/ospd-openvas/files/ospd.conf b/net-analyzer/ospd-openvas/files/ospd.conf
new file mode 100644
index 000000000000..bac46565001c
--- /dev/null
+++ b/net-analyzer/ospd-openvas/files/ospd.conf
@@ -0,0 +1,10 @@
+[OSPD - openvas]
+
+#required by gvmd
+unix_socket = /tmp/ospd.sock
+
+#socket_mode = 0o770
+#unix_socket = /run/ospd/ospd-openvas.pid
+
+log_level = DEBUG
+log_file = /var/log/gvm/ospd-openvas.log
diff --git a/net-analyzer/ospd-openvas/files/redis.conf.example b/net-analyzer/ospd-openvas/files/redis.conf.example
new file mode 100644
index 000000000000..6a41211aaae8
--- /dev/null
+++ b/net-analyzer/ospd-openvas/files/redis.conf.example
@@ -0,0 +1,57 @@
+bind 127.0.0.1
+protected-mode yes
+port 0
+tcp-backlog 511
+unixsocket /tmp/redis.sock
+unixsocketperm 700
+timeout 0
+tcp-keepalive 300
+daemonize no
+supervised no
+pidfile /run/redis/redis.pid
+loglevel notice
+logfile /var/log/redis/redis.log
+databases 16
+always-show-logo yes
+stop-writes-on-bgsave-error yes
+rdbcompression yes
+rdbchecksum yes
+dbfilename dump.rdb
+dir /var/lib/redis/
+slave-serve-stale-data yes
+slave-read-only yes
+repl-diskless-sync no
+repl-diskless-sync-delay 5
+repl-disable-tcp-nodelay no
+slave-priority 100
+lazyfree-lazy-eviction no
+lazyfree-lazy-expire no
+lazyfree-lazy-server-del no
+slave-lazy-flush no
+appendonly no
+appendfilename "appendonly.aof"
+appendfsync everysec
+no-appendfsync-on-rewrite no
+auto-aof-rewrite-percentage 100
+auto-aof-rewrite-min-size 64mb
+aof-load-truncated yes
+aof-use-rdb-preamble no
+lua-time-limit 5000
+slowlog-log-slower-than 10000
+slowlog-max-len 128
+latency-monitor-threshold 0
+notify-keyspace-events ""
+hash-max-ziplist-entries 512
+hash-max-ziplist-value 64
+list-max-ziplist-size -2
+list-compress-depth 0
+set-max-intset-entries 512
+zset-max-ziplist-entries 128
+zset-max-ziplist-value 64
+hll-sparse-max-bytes 3000
+activerehashing yes
+client-output-buffer-limit normal 0 0 0
+client-output-buffer-limit slave 256mb 64mb 60
+client-output-buffer-limit pubsub 32mb 8mb 60
+hz 10
+aof-rewrite-incremental-fsync yes