diff options
Diffstat (limited to 'net-analyzer/gsad/files/gsad-22.init')
-rw-r--r-- | net-analyzer/gsad/files/gsad-22.init | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/net-analyzer/gsad/files/gsad-22.init b/net-analyzer/gsad/files/gsad-22.init index f416990b19a4..aae78b2e1ab8 100644 --- a/net-analyzer/gsad/files/gsad-22.init +++ b/net-analyzer/gsad/files/gsad-22.init @@ -3,20 +3,29 @@ # Distributed under the terms of the GNU General Public License v2 : ${GSAD_USER:=gvm} -: ${GSAD_GROUP:=$(id -ng ${GSAD_USER})} : ${GSAD_TIMEOUT:=30} +: ${GSAD_PIDFILE:="/run/gsad/gsad.pid"} name="Greenbone Security Assistant (GSA)" command="/usr/bin/gsad" -command_user="${GSAD_USER}:${GSAD_GROUP}" -command_args="${GSAD_OPTIONS} ${GSAD_LISTEN_ADDRESS} ${GSAD_LISTEN_PORT} ${GVMD_LISTEN_ADDRESS} ${GVMD_LISTEN_PORT} ${GSAD_GNUTLS_PRIORITIES}" +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 gvmd + need localmount net + want gvmd } start_pre() { - checkpath -d --owner ${GSAD_USER} /var/run/gsad + checkpath -d --mode 0755 --owner root /run/gsad } + +stop_post() { + if [ -f "${GSAD_PIDFILE}" ]; then + ebegin "Removing PID file" + rm --force "${GSAD_PIDFILE}" + eend $? + fi +} + |