Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > e168fe4c6ea70290c7dbbe71a46c8502 > files > 2

nufw-2.2.21-4mdv2010.0.i586.rpm

#!/bin/sh
#
# Startup script for nufw
#
# chkconfig: 345 86 16
# description: Nufw is user filtering firewall.
# processname: nufw


# Source function library.
. /etc/rc.d/init.d/functions

DAEMON_NAME=nufw

[ -f /etc/sysconfig/$DAEMON_NAME ] && . /etc/sysconfig/$DAEMON_NAME

if [ ! "$VERBOSITY" ]; then
  VERBOSITY="vv"
fi

if [ ! "$LISTEN_ADDRESS" ]; then
  LISTEN_ADDRESS="127.0.0.1"
fi

if [ ! "$NUAUTH_ADDRESS" ]; then
  NUAUTH_ADDRESS="127.0.0.1"
fi

if [ ! "$NUAUTH_UDP_PORT" ]; then
  NUAUTH_UDP_PORT=4128
fi

if [ ! "$FW_TIMEOUT" ]; then
  FW_TIMEOUT=15
fi

if [ ! "$TRACK_SIZE" ]; then
  TRACK_SIZE=1000
fi

DAEMON_OPTS="-D -$VERBOSITY -L $LISTEN_ADDRESS \
    -d $NUAUTH_ADDRESS -p $NUAUTH_UDP_PORT  -t $FW_TIMEOUT -T $TRACK_SIZE"

case "$1" in
  start)
        gprintf "Starting $DAEMON_NAME: "
        daemon $DAEMON_NAME $DAEMON_OPTS
        echo
        touch /var/lock/subsys/$DAEMON_NAME
        ;;
  stop)
        gprintf "Shutting down $DAEMON_NAME: "
        killproc $DAEMON_NAME
        echo
        rm -f /var/lock/subsys/$DAEMON_NAME
        ;;
  status)
        status $DAEMON_NAME
        ;;
  reload|restart)
        $0 stop
        $0 start
        ;;
  *)
        gprintf "Usage: %s {start|stop|restart|reload|status}\n" "$0"
        exit 1
esac

exit 0