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