Add initscript for conntrackd
[ipfire-2.x.git] / src / initscripts / system / conntrackd
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/conntrackd
4 ########################################################################
5
6 . /etc/sysconfig/rc
7 . ${rc_functions}
8
9 case "${1}" in
10         start)
11                 # Don't attempt to launch the daemon when we have no configuration
12                 if [ ! -s "/etc/conntrackd/conntrackd.conf" ]; then
13                         exit 0
14                 fi
15
16                 boot_mesg "Starting Connection Tracking Daemon..."
17                 loadproc /usr/sbin/conntrackd -d
18                 ;;
19
20         stop)
21                 boot_mesg "Stopping Connection Tracking Daemon..."
22                 killproc /usr/sbin/conntrackd
23                 ;;
24
25         restart)
26                 ${0} stop
27                 sleep 1
28                 ${0} start
29                 ;;
30
31         status)
32                 statusproc /usr/sbin/conntrackd
33                 ;;
34
35         *)
36                 echo "Usage: ${0} {start|stop|restart|status}"
37                 exit 1
38                 ;;
39 esac
40
41 # End $rc_base/init.d/conntrackd