#!/bin/sh -e

CONFIG=/etc/snort/snort.conf

test -f /usr/sbin/snort || exit 0

test -f $CONFIG && . $CONFIG

test "$DEBIAN_SNORT_STARTUP" = "dialup" || exit 0

# to find the lib files
cd /etc/snort

start-stop-daemon --start --quiet --exec /usr/sbin/snort -- \
	-D \
	-S "HOME_NET=$PPP_LOCAL/32" \
	-h "$PPP_LOCAL/32" \
	-c /etc/snort/snort-lib \
	-l /var/log/snort/ \
	-s \
	$DEBIAN_SNORT_OPTIONS \
	-i $PPP_IFACE \
	>/dev/null

exit 0
