diff options
Diffstat (limited to 'net-analyzer/openvas-scanner/files/redis-openvas.initd')
-rw-r--r-- | net-analyzer/openvas-scanner/files/redis-openvas.initd | 29 |
1 files changed, 29 insertions, 0 deletions
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..0841942eac6d --- /dev/null +++ b/net-analyzer/openvas-scanner/files/redis-openvas.initd @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +: ${REDIS_DIR:=/var/lib/openvas/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}" +directory="${REDIS_DIR}" + +start_post() { + checkpath -f --mode 0644 --owner ${REDIS_USER}:${REDIS_GROUP} /var/log/gvm/openvas.log +} + +depend() { + use localmount logger + after keepalived +} |