This is one I put together for my RH7 box. (see below)
When redhat boots, it will give you the status just like all the other
services.
(i.e. [OK] or [FAILED] etc.)
Filename is: /etc/init.d/nessusd
Then create a link to it in /etc/rc3.d (I named the link S98nessusd)
i.e.
From /etc/rc3.d
ln -s /etc/init.d/nessusd S98nessusd
This works great on my box. Hope it helps.
Todd
============================================================================
====
#! /bin/sh
#
# nessusd Start/Stop the nessusd daemon.
#
# processname: nessusd
# pidfile: /usr/local/var/nessus/nessusd.pid
# Source function library.
. /etc/init.d/functions
RETVAL=0
# See how we were called.
start() {
echo -n "Starting nessus daemon: "
daemon /usr/local/sbin/nessusd -D
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/nessusd
return $RETVAL
}
stop() {
echo -n "Stopping nessus daemon: "
killproc nessusd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/nessusd
return $RETVAL
}
rhstatus() {
status nessusd
}
restart() {
stop
start
}
reload() {
echo -n "Reloading nessus daemon configuration: "
killproc nessusd -HUP
retval=$?
echo
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
rhstatus
;;
condrestart)
[ -f /var/lock/subsys/nessusd ] && restart || :
;;
*)
echo "Usage: nessusd {start|stop|status|restart|condrestart}"
exit 1
esac
exit $?
-----Original Message-----
From: Ryan Hill [mailto:rhill@xypoint.com]
Sent: Wednesday, August 15, 2001 5:43 PM
To: Nessus List (nessus@list.nessus.org)
Subject: Starting Nessus at Boot (RH 7.1)
All,
Apologies if I've missed this somwhere, but does anyone have a start-up
script for Nessusd that would allow the daemon to be started at boot time?
(RedHat 7.1) I've looked through the documentation and wanted to make sure
one doesn't already exist before I put something together myself.
Thanks in advance,
Ryan Hill, MCSE
Network & Systems Engineer
Corporate Information Systems
Telecommunication Systems, Inc. (TCS) - <
http://www.telecomsys.com/ <
http://www.telecomsys.com/> >
v: 206.792.2276 - f: 206.792.2001
pgp: 0x17CE70AB
***********************************************************************
This electronic message may contain information that is confidential and/or legally privileged. It is intended only for the use of the individual(s) and entity named as recipients in the message. If you are not an intended recipient of this message, please notify the sender immediately and delete the material from any computer. Do not deliver, distribute or copy this message, and do not disclose its contents or take any action in reliance on the information it contains. Thank you.