Pakfire CGI ein bisl erweitert, Index CGI um die DIAL CGI erweitert -> Funktion teste...
[ipfire-2.x.git] / src / initscripts / init.d / snort
CommitLineData
bd3a8a50
RZ
1#!/bin/sh
2#
3# setting and configure Parameter
4
5cd /etc/snort
6snort=/usr/sbin/snort
7vars=/etc/snort/vars
8eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
9HOME_NET=`echo $GREEN_NETADDRESS`
10EXTERMAL_NET="EXTERNAL_NET=ANY"
11
12# setting the snort sensore to the interface !!
13DEVICE=`echo $GREEN_DEV`
14PIDFILE=/var/run/snort_$DEVICE.pid
15startparameter=" -c snort.conf -i $DEVICE -D -l /var/log/snort --pid-path $PIDFILE"
16
17
18#create the DYNAMIC vars Variable of Snort
19 echo "var HOME_NET $HOME_NET" > $vars
20 echo "var EXTERNAL_NET ANY" >> $vars
21
22
23# Begin $rc_base/init.d/snort
24
25. /etc/sysconfig/rc
26. $rc_functions
27
28case "$1" in
29 start)
30 boot_mesg "Starting snort..."
31 loadproc $snort $startparameter
32 ;;
33
34 stop)
35 boot_mesg "Stopping snort..."
36 killproc -p $PIDFILE /var/run
37 ;;
38
39 status)
40 statusproc /usr/sbin/snort
41 ;;
42
43 *)
44 echo "Usage: $0 {start|stop|status}"
45 exit 1
46 ;;
47esac
48
49# End $rc_base/init.d/snort