OT: snort i dwa interfejsy do nasluchu

Tomasz Buziak t.buziak w spzoz.lukow.pl
Wto, 2 Wrz 2003, 14:02:17 CEST


czy da rade, przerobic skrypt startowy snorta w pld, zeby odpalal sie demon z
dwoch configow, na dwoch interfejsach i ladnie killowal?

cat /etc/rc.d/init.d/snort
[...]
case "$1" in
  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 \
                        -i ppp0 -u snort -g snort -d -D \
                        -l /var/log/snort -c /etc/snort/snort.conf
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/snort
        else
                # show "%s service is already running." <service>
                msg_already_running snort
                exit 1
        fi
        ;;
  stop)
        # Stop daemons.
        # show "Stopping %s service" <service>
        if [ -f /var/lock/subsys/snort ]; then
                msg_stopping snort
                killproc snort
                RETVAL=$?
                rm -f /var/lock/subsys/snort
        else
                # show "%s service is not running." <service>
                msg_not_running snort
                exit 1
        fi
        ;;
  reload)
        msg_reloading snort
        killproc snort -HUP
        RETVAL=$?
        ;;
[...]


-- 
pozdrawiam ...



Więcej informacji o liście dyskusyjnej pld-users-pl