50 lines
836 B
Plaintext
50 lines
836 B
Plaintext
|
#!/bin/sh
|
||
|
#
|
||
|
# Startup script for OpenVAS
|
||
|
#
|
||
|
# chkconfig: 345 85 15
|
||
|
# description: OpenVas is a security auditing tool
|
||
|
# processname: openvasd
|
||
|
# config: /etc/nessus/openvasd.conf
|
||
|
|
||
|
|
||
|
# Source function library.
|
||
|
. /etc/rc.d/init.d/functions
|
||
|
|
||
|
# -a 127.0.0.1 : restricted to localhost, add it for restricted access
|
||
|
#OPTIONS="-a 127.0.0.1"
|
||
|
OPTIONS=""
|
||
|
|
||
|
# See how we were called.
|
||
|
case "$1" in
|
||
|
start)
|
||
|
gprintf "Starting openvasd: "
|
||
|
if [ -f /var/lock/subsys/openvasd ] ; then
|
||
|
echo
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
daemon /usr/sbin/openvasd $OPTIONS -D
|
||
|
echo
|
||
|
touch /var/lock/subsys/openvasd
|
||
|
;;
|
||
|
stop)
|
||
|
gprintf "Shutting down openvasd: "
|
||
|
killproc openvasd
|
||
|
echo
|
||
|
rm -f /var/lock/subsys/openvasd
|
||
|
;;
|
||
|
status)
|
||
|
status openvasd
|
||
|
;;
|
||
|
reload|restart)
|
||
|
$0 stop
|
||
|
$0 start
|
||
|
;;
|
||
|
*)
|
||
|
gprintf "Usage: %s {start|stop|restart|reload|status}\n" "$0"
|
||
|
exit 1
|
||
|
esac
|
||
|
|
||
|
exit 0
|