#!/bin/sh 
# 
# Startup script for Nessus 
# 
# chkconfig: 345 85 15 
# description: Nessus is a security auditing tool 
# processname: nessusd 
# config: /usr/local/etc/nessus/nessusd.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" 


# See how we were called. 
case "$1" in 
  start) 
        echo -n "Starting nessusd: " 
        if [ -f /var/lock/subsys/nessusd ] ; then 
                echo 
                exit 1 
        fi 


        daemon /usr/local/sbin/nessusd $OPTIONS -D 
        echo 
        touch /var/lock/subsys/nessusd 
        ;; 
  stop) 
        echo -n "Shutting down nessusd: " 
        killproc nessusd 
        echo 
        rm -f /var/lock/subsys/nessusd 
        ;; 
  status) 
        status nessusd 
        ;; 
  reload|restart) 
        $0 stop 
        $0 start 
        ;; 
  *) 
        echo "Usage: $0 {start|stop|restart|reload|status}"
        exit 1 
esac 


exit 0 



