diff options
Diffstat (limited to 'net-analyzer/nessus-agent-bin/files/nessusagent.initd')
-rw-r--r-- | net-analyzer/nessus-agent-bin/files/nessusagent.initd | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/net-analyzer/nessus-agent-bin/files/nessusagent.initd b/net-analyzer/nessus-agent-bin/files/nessusagent.initd new file mode 100644 index 000000000000..6f43fc421e1b --- /dev/null +++ b/net-analyzer/nessus-agent-bin/files/nessusagent.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +start() { + ebegin "Starting nessusagent" + start-stop-daemon --start --quiet --exec /opt/nessus_agent/sbin/nessus-service -- -D --quiet + eend $? +} + +stop() { + ebegin "Stopping nessusagent" + start-stop-daemon --stop --quiet --exec /opt/nessus_agent/sbin/nessus-service + einfo "Waiting for the environment to be sane" + while [ -n "$RUNNING" ] ; do + sleep 1 + RUNNING=$(ps aux | grep -m 1 nessusd: | grep -v grep) + done + sleep 3 + eend $? +} |