Update of /cvsroot/devil-linux/build/scripts/scripts
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18605/scripts
Added Files:
conntrackd
Log Message:
- added init file, added configuration example
--- NEW FILE: conntrackd ---
#!/bin/sh
#
# $Source: /cvsroot/devil-linux/build/scripts/scripts/conntrackd,v $
# $Revision: 1.1 $
# $Date: 2009/02/27 23:51:37 $
#
# http://www.devil-linux.org
#
### BEGIN INIT INFO
# Provides: conntrackd
# Required-Start: $network $syslog $firewall
# Required-Stop: $network $syslog $firewall
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Conntrackd
### END INIT INFO
# settings/functions
source /etc/sysconfig/config
source /etc/init.d/functions
NAME=conntrackd
DAEMON=/usr/sbin/conntrackd
CONFIG=/etc/conntrackd/conntrackd.conf
PARAMETER="-d -C $CONFIG"
# Exit if the package is not installed
if [ ! -e $DAEMON ]; then
echo
echo "$DAEMON not found. Did you install the package?"
exit 1
fi
# Check for config file
if [ ! -f /etc/conntrackd/conntrackd.conf ]; then
echo "Config file \"$CONFIG\" not found."
exit 1
fi
CONFIGNAME=CONNTRACKD
eval START=\$START_$CONFIGNAME
# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}
# Force execution if not called by a runlevel directory.
test $link = $base && START=yes
test "$START" = "yes" || exit 0
case "$1" in
start)
echo -n "Starting $NAME: "
loadproc $DAEMON $PARAMETER
;;
stop)
echo -n "Shutting down $NAME: "
killproc $DAEMON
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/conntrackd {start|stop|restart}"
exit 1
;;
esac
exit 0
|