#!/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 [ ! "$LISTEN_UDP_PORT" ]; then LISTEN_UDP_PORT=4129 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_UDP_PORT -L $LISTEN_ADDRESS \ -d $NUAUTH_ADDRESS -p $NUAUTH_UDP_PORT -t $FW_TIMEOUT -T $TRACK_SIZE" # as nufw use it modprobe ip_queue 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 ;; *) echo "Usage: $0 {start|stop|restart|reload|status}" exit 1 esac exit 0