summaryrefslogtreecommitdiff
path: root/conntrack-tools/conntrackd.rc
blob: 9d1dbd9a932dc82b9ea2b383bd7babc1b555b64a (plain)
    1 #!/bin/sh
    2 #
    3 # /etc/rc.d/conntrackd: start/stop conntrack daemon
    4 #
    5 
    6 # User settings here
    7 DAEMON=conntrackd
    8 RUN_AS_USER=root
    9 
   10 # If you have to edit this section for this or any other 
   11 # port useage let me know, with a patch or added lines, 
   12 # or simplely e-mail me the altered file and I'll include the changes.
   13 
   14 RETVAL=0
   15 
   16 case $1 in
   17 start)
   18 	echo -n "Starting $DAEMON..."
   19 	su $RUN_AS_USER -c /usr/sbin/$DAEMON > /dev/null & RETVAL=$?
   20 	if [ $RETVAL = 0 ]; then
   21 		echo " done."
   22 	fi
   23 	;;
   24 stop)
   25 	echo -n "Shutting down $DAEMON..."
   26 	killall -q /usr/sbin/$DAEMON
   27 	RETVAL=$?
   28 	echo " done."
   29 	;;
   30 restart)
   31 	$0 stop
   32 	sleep 5
   33 	$0 start
   34 	RETVAL=$?
   35 	;;
   36 *)
   37 	echo "usage: $0 [start|stop|restart]"
   38 	exit 1
   39 	;;
   40 esac
   41 
   42 exit $RETVAL
   43 
   44 # End of file

Generated by cgit