You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-analyzer/gsad/files/gsad-22.init

36 lines
863 B

#!/sbin/openrc-run
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
: ${GSAD_USER:=gvm}
: ${GSAD_GROUP:=gvm}
: ${GSAD_TIMEOUT:=30}
: ${GSAD_PIDFILE:="/run/gsad/gsad.pid"}
name="Greenbone Security Assistant (GSA)"
command="/usr/bin/gsad"
command_args="${GSAD_OPTIONS} ${GSAD_LISTEN_ADDRESS} ${GSAD_LISTEN_PORT} ${GVMD_LISTEN_ADDRESS} ${GVMD_LISTEN_PORT} ${GSAD_GNUTLS_PRIORITIES} --drop-privileges=${GSAD_USER}"
retry="${GSAD_TIMEOUT}"
depend() {
after bootmisc
need localmount net
want gvmd
}
start_pre() {
checkpath -d --mode 0755 --owner root /run/gsad
}
start_post() {
checkpath -f --mode 0644 --owner "${GSAD_USER}:${GSAD_GROUP}" /var/log/gvm/gsad.log
}
stop_post() {
if [ -f "${GSAD_PIDFILE}" ]; then
ebegin "Removing PID file"
rm --force "${GSAD_PIDFILE}"
eend $?
fi
}