5
# Required-Start: $network $local_fs $remote_fs
6
# Required-Stop: $network $local_fs $remote_fs
7
# Should-Start: $syslog
9
# Default-Start: 2 3 4 5
11
# Short-Description: Passive asset detection system
12
# Description: Signature based detection engine used to passively
13
# detect network assets.
18
. /lib/lsb/init-functions
20
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
21
DESC="Passive Asset Detection System"
24
PIDFILE=/var/run/$NAME.pid
25
SCRIPTNAME=/etc/init.d/$NAME
27
# Gracefully exit if the package has been removed.
28
test -x $DAEMON || exit 0
31
OPTS="-D -c /etc/pads/pads.conf"
33
# Read config file if it is present.
34
if [ -r /etc/default/$NAME ]
40
if [ -f "$PIDFILE" ] && \
41
[ "x`pidof -s $NAME`" = "x`cat $PIDFILE 2> /dev/null`" ]
49
# Function that starts the daemon/service.
52
start-stop-daemon --start --quiet --pidfile $PIDFILE \
53
--exec $DAEMON -- $OPTS > /dev/null
57
# Function that stops the daemon/service.
60
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
65
# Function that sends a SIGHUP to the daemon/service.
68
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
69
--name $NAME --signal 1
74
log_daemon_msg "Starting $DESC" "$NAME"
76
log_progress_msg "(already running)"
87
log_daemon_msg "Stopping $DESC" "$NAME"
89
log_progress_msg "not running"
101
log_daemon_msg "Checking status of $DESC" "$NAME"
103
log_progress_msg "running"
106
log_progress_msg "not running"
110
restart|reload|force-reload)
116
echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload}" >&2