]> git.pld-linux.org Git - packages/bird.git/blob - bird.init
- include <stdio.h> header file, so the configuration parser compiles
[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         fi
43         ;;
44   stop)
45         # Stop daemons.
46         if [ -f /var/lock/subsys/bird ]; then
47                 msg_stopping "bird"
48                 killproc bird
49                 rm -f /var/lock/subsys/bird
50         else
51                 msg_Not_Running "bird"
52         fi
53         ;;
54   status)
55         status bird
56         ;;
57   restart|reload)
58         $0 stop
59         $0 start
60         ;;
61   *)
62         msg_Usage "$0 {start|stop|status|restart|reload}"
63         exit 1
64 esac
65
66 exit 0
This page took 0.139274 seconds and 3 git commands to generate.