summaryrefslogtreecommitdiff
blob: 5bae99df1c90d79367b0fe929edbbffa6e9783d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/sbin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

name="OpenVAS Scanner"
command="/usr/sbin/openvassd"
command_args="${SCANNER_LISTEN} ${SCANNER_PORT} ${SCANNER_SRCIP} ${SCANNER_EXTRA_ARGS}"
pidfile="/run/openvassd.pid"
extra_stopped_commands="create_cache"

depend() {
	after bootmisc
	need localmount net
}

start_pre() {
	checkpath --directory --mode 0775 --quiet /var/cache/openvas
}

create_cache() {
	checkpath --directory --mode 0775 --quiet /var/cache/openvas
	ebegin "Generating initial Cache"
	/usr/sbin/openvassd --foreground --only-cache
	eend $?
}