5 # Required-Start: $local_fs $remote_fs $network
6 # Required-Stop: $local_fs $remote_fs $network
7 # Default-Start: 2 3 4 5
9 # Short-Description: Start PRADS sensor.
10 # Description: This script provides a packet level
11 # passive host and service detecion system
12 # in a chroot environment
15 # Source function library
16 .
/lib
/lsb
/init-functions
19 DESC
="Passive Realtime Asset Detection System"
20 PATH
=/sbin
:/bin
:/usr
/sbin
:/usr
/bin
24 PIDFILE
=$RUNDIR/$NAME.pid
25 LOGFILE
=/var
/log
/prads.log
26 DAEMON_OPTS
="-u 6005 -g 6005 -D -C $RUNDIR -l $LOGFILE -p $NAME.pid"
29 test -x $DAEMON ||
exit 0
31 # Include prads defaults if available
32 if [ -f /etc
/default
/prads
] ; then
38 output
=$
(/bin
/tempfile
-s.prads
)
39 log_daemon_msg
"Starting $DESC"
40 log_progress_msg
$NAME
41 if start-stop-daemon \
42 --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- \
43 -P ${PIDFILE} ${DAEMON_OPTS} > ${output} 2>&1; then
53 log_daemon_msg
"Stopping $DESC"
54 log_progress_msg
$NAME
55 if start-stop-daemon \
56 --stop --quiet --pidfile $PIDFILE --retry 10 \
64 log_daemon_msg
"Reloading $DESC"
65 log_progress_msg
$NAME
73 status_of_proc
-p "${PIDFILE}" "${DAEMON}" "${NAME}"
80 log_success_msg
"Usage: $0 {start|stop|restart|force-reload}"