]> git.pld-linux.org Git - packages/Firebird.git/blob - firebird.init
- rel 7
[packages/Firebird.git] / firebird.init
1 #!/bin/sh
2 #
3 # firebird              RDBMS
4 #
5 # chkconfig:    2345 80 30
6 # description:  firebird is a database server
7
8 # Source function library.
9 . /etc/rc.d/init.d/functions
10
11 # Source networking configuration.
12 . /etc/sysconfig/network
13
14
15 # Source oident configureation.
16 if [ -f /etc/sysconfig/firebird ]; then
17         . /etc/sysconfig/firebird
18 fi
19
20 DAEMON=/usr/lib/interbase/bin/fbmgr.bin
21
22 # Check that networking is up.
23 if is_yes "${NETWORKING}"; then
24         if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
25                 msg_network_down firebird
26                 exit 1
27         fi
28 else
29         exit 0
30 fi
31
32 RETVAL=0
33 # See how we were called.
34 case "$1" in
35   start)
36         # Start daemons.
37         if [ ! -f /var/lock/subsys/firebird ]; then
38                 msg_starting firebird
39                 daemon --user firebird $DAEMON -start -forever
40                 RETVAL=$?
41                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/firebird
42         else
43                 msg_already_running firebird
44         fi
45         ;;
46   stop)
47         # Stop daemons.
48         if [ -f /var/lock/subsys/firebird ]; then
49                 msg_stopping firebird
50                 daemon --user firebird $DAEMON -shut
51                 rm -f /var/lock/subsys/firebird >/dev/null 2>&1
52         else
53                 msg_not_running firebird
54         fi
55         ;;
56   restart|force-reload)
57         $0 stop
58         $0 start
59         exit $?
60         ;;
61   status)
62         status fb_inet_server
63         exit $?
64         ;;
65   *)
66         msg_usage "$0 {start|stop|restart|force-reload|status}"
67         exit 3
68 esac
69
70 exit $RETVAL
This page took 0.045558 seconds and 3 git commands to generate.