]> git.pld-linux.org Git - packages/Firebird.git/blame - firebird.init
- looks obsolete
[packages/Firebird.git] / firebird.init
CommitLineData
ff2dcfcb
AM
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.
16if [ -f /etc/sysconfig/firebird ]; then
17 . /etc/sysconfig/firebird
18fi
19
26f37d7f 20DAEMON=/usr/lib/interbase/bin/fbmgr.bin
ff2dcfcb
AM
21
22# Check that networking is up.
23if 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
28else
29 exit 0
30fi
31
c033e0a1 32start() {
ff2dcfcb
AM
33 if [ ! -f /var/lock/subsys/firebird ]; then
34 msg_starting firebird
35 daemon --user firebird $DAEMON -start -forever
36 RETVAL=$?
37 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/firebird
38 else
39 msg_already_running firebird
40 fi
c033e0a1
JB
41}
42
43stop() {
ff2dcfcb
AM
44 if [ -f /var/lock/subsys/firebird ]; then
45 msg_stopping firebird
46 daemon --user firebird $DAEMON -shut
47 rm -f /var/lock/subsys/firebird >/dev/null 2>&1
48 else
49 msg_not_running firebird
9ae190ed 50 fi
c033e0a1
JB
51}
52
53condrestart() {
54 if [ -f /var/lock/subsys/firebird ]; then
55 stop
56 start
57 else
58 msg_not_running firebird
59 RETVAL=$1
60 fi
61}
62
63RETVAL=0
64# See how we were called.
65case "$1" in
66 start)
67 start
ff2dcfcb 68 ;;
c033e0a1
JB
69 stop)
70 stop
71 ;;
72 restart)
73 stop
74 start
75 ;;
76 try-restart)
77 condrestart 0
78 ;;
79 force-reload)
80 condrestart 7
ff2dcfcb
AM
81 ;;
82 status)
83 status fb_inet_server
84 exit $?
85 ;;
86 *)
c033e0a1 87 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
ff2dcfcb
AM
88 exit 3
89esac
90
91exit $RETVAL
This page took 0.169159 seconds and 4 git commands to generate.