]> git.pld-linux.org Git - packages/bird.git/blob - bird.init
- updated
[packages/bird.git] / bird.init
1 #!/bin/sh
2 #
3 # bird          Starts the Dynamic Route Daemon 
4 #
5 # chkconfig:    345 80 45
6 #
7 # description:  Dynamic Route Daemon for IPv4 and IPv6 routers
8 #
9 # processname:  bird
10 # config:       /etc/bird.conf
11
12
13 # Source function library
14 . /etc/rc.d/init.d/functions
15
16 # Get network config
17 . /etc/sysconfig/network
18
19 # Get service config
20 [ -f /etc/sysconfig/bird ] && . /etc/sysconfig/zebra
21
22 # Check that networking is up.
23 if is_no "${NETWORKING}"; then
24         msg_network_down bird
25         exit 1
26 fi
27
28 # Sanity checks.
29 [ -f /etc/bird.conf ] || exit 0
30
31
32 # See how we were called.
33 case "$1" in
34   start)
35         # Check if the services are already running?
36         if [ ! -f /var/lock/subsys/bird ]; then
37                 msg_starting "bird"
38                 daemon ${SERVICE_RUN_NICE_LEVEL} bird
39                 touch /var/lock/subsys/bird
40         else
41                 msg_already_running "bird"
42                 exit 1
43         fi
44         ;;
45   stop)
46         # Stop daemons.
47         if [ -f /var/lock/subsys/bird ]; then
48                 msg_stopping "bird"
49                 killproc bird
50                 rm -f /var/lock/subsys/bird
51         else
52                 msg_not_running "bird"
53                 exit 1
54         fi
55         ;;
56   status)
57         status bird
58         ;;
59   restart|reload)
60         $0 stop
61         $0 start
62         ;;
63   *)
64         msg_usage "$0 {start|stop|restart|reload|status}"
65         exit 1
66 esac
67
68 exit 0
This page took 0.028533 seconds and 4 git commands to generate.