summaryrefslogtreecommitdiff
path: root/net-analyzer/openvas-scanner/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/openvas-scanner/files')
-rw-r--r--net-analyzer/openvas-scanner/files/README.gentoo3
-rw-r--r--net-analyzer/openvas-scanner/files/openvas.conf-221
-rw-r--r--net-analyzer/openvas-scanner/files/redis-openvas.confd20
-rw-r--r--net-analyzer/openvas-scanner/files/redis-openvas.initd25
-rw-r--r--net-analyzer/openvas-scanner/files/redis-openvas.service13
-rw-r--r--net-analyzer/openvas-scanner/files/redis-openvas.tmpfiles2
6 files changed, 64 insertions, 0 deletions
diff --git a/net-analyzer/openvas-scanner/files/README.gentoo b/net-analyzer/openvas-scanner/files/README.gentoo
new file mode 100644
index 000000000000..16547c23c7b4
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/README.gentoo
@@ -0,0 +1,3 @@
+The redis configuration file is located in:
+/etc/gvm/redis-openvas.conf
+Please apply your changes to the new configuration files.
diff --git a/net-analyzer/openvas-scanner/files/openvas.conf-22 b/net-analyzer/openvas-scanner/files/openvas.conf-22
new file mode 100644
index 000000000000..b2d964ff4b53
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas.conf-22
@@ -0,0 +1 @@
+db_address = /run/redis-openvas/redis.sock
diff --git a/net-analyzer/openvas-scanner/files/redis-openvas.confd b/net-analyzer/openvas-scanner/files/redis-openvas.confd
new file mode 100644
index 000000000000..2e9ec5cfbf16
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/redis-openvas.confd
@@ -0,0 +1,20 @@
+# Redis user.
+REDIS_USER="gvm"
+
+# Redis group.
+REDIS_GROUP="gvm"
+
+# Redis configuration file.
+REDIS_CONF="/etc/gvm/redis-openvas.conf"
+
+# Redis dump directory.
+REDIS_DIR="/var/lib/gvm/redis"
+
+# Redis options.
+# (Redis expects the first argument to be the configuration file.)
+REDIS_OPTS="${REDIS_CONF}"
+
+# Specify the network service that corresponds to the "bind" setting
+# in your redis.conf. For example, if you bind to 127.0.0.1, this should
+# be set to "net.lo" which provides the loopback interface.
+rc_need="net.lo"
diff --git a/net-analyzer/openvas-scanner/files/redis-openvas.initd b/net-analyzer/openvas-scanner/files/redis-openvas.initd
new file mode 100644
index 000000000000..5c50d29dae6a
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/redis-openvas.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${REDIS_DIR:=/var/lib/gvm/redis}
+: ${REDIS_CONF:=/etc/gvm/redis-openvas.conf}
+: ${REDIS_OPTS:="${REDIS_CONF}"}
+: ${REDIS_USER:=gvm}
+: ${REDIS_GROUP:=gvm}
+: ${REDIS_TIMEOUT:=30}
+
+# https://bugs.gentoo.org/631002#c10
+# Force '--daemonize no' to override the config file
+command="/usr/sbin/redis-server"
+command_args="${REDIS_OPTS} --daemonize no"
+command_background="true"
+command_user="${REDIS_USER}:${REDIS_GROUP}"
+pidfile="/run/${RC_SVCNAME}/redis-server.pid"
+retry="${REDIS_TIMEOUT}"
+start_stop_daemon_args="--chdir \"${REDIS_DIR}\""
+
+depend() {
+ use localmount logger
+ after keepalived
+}
diff --git a/net-analyzer/openvas-scanner/files/redis-openvas.service b/net-analyzer/openvas-scanner/files/redis-openvas.service
new file mode 100644
index 000000000000..5eb8dd29e287
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/redis-openvas.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=A persistent key-value database
+After=syslog.target network.target
+PartOf=gvm.target
+
+[Service]
+Type=forking
+PIDFile=/run/redis-openvas/redis-server.pid
+ExecStart=/usr/sbin/redis-server /etc/gvm/redis-openvas.conf
+User=gvm
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-analyzer/openvas-scanner/files/redis-openvas.tmpfiles b/net-analyzer/openvas-scanner/files/redis-openvas.tmpfiles
new file mode 100644
index 000000000000..6dea2932cc0b
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/redis-openvas.tmpfiles
@@ -0,0 +1,2 @@
+# redis runtime directory
+d /run/redis-openvas 0755 gvm root -