#!/bin/sh -e

CONFIG=/etc/snort/snort.debian.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

/sbin/start-stop-daemon --start --pidfile /var/run/snort/snort_$PPP_IFACE.pid --quiet --exec /usr/sbin/snort -- \
	-D \
	-S "HOME_NET=$PPP_LOCAL/32" \
	-h "$PPP_LOCAL/32" \
	-c /etc/snort/snort.conf \
	-l /var/log/snort/ \
	-b \
	-d \
	-u snort \
	-g snort \
	-i $PPP_IFACE \
	$DEBIAN_SNORT_OPTIONS \
	>/dev/null

exit 0
