# Check that networking is up.
if is_yes "${NETWORKING}"; then
if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
- # nls "ERROR: Networking is down. %s can't be run." <service>
msg_network_down snort
exit 1
fi
start)
# Check if the service is already running?
if [ ! -f /var/lock/subsys/snort ]; then
- # show "Starting %s service." <service>
msg_starting snort
# we need full path here; see SnortUsersManual.pdf
daemon /usr/sbin/snort \
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/snort
else
- # show "%s service is already running." <service>
msg_already_running snort
fi
;;
stop)
if [ -f /var/lock/subsys/snort ]; then
# Stop daemons.
- # show "Stopping %s service" <service>
msg_stopping snort
killproc snort
rm -f /var/lock/subsys/snort
killproc snort -HUP
RETVAL=$?
else
- # show "%s service is not running." <service>
msg_not_running snort >&2
exit 7
fi