Debian Codegraph @

builds/install/misc/firebird.init.d.Solaris.in

raw
1 #!/bin/sh
2 #
3
4 # This script is also called indirectly by the CDE dtconfig command.
5 # This file belongs in /etc/init.d where it will be run
6 # on system startup and shutdown to start the background
7 # Firebird database server daemon
8
9 mode=$1
10
11 ISC_USER=sysdba
12 ISC_PASSWORD=masterkey
13 FIREBIRD=/usr/local/firebird
14 RUN_USER=firebird
15
16 export ISC_USER ISC_PASSWORD FIREBIRD
17
18 usage_error() {
19 echo " $0 start (start Firebird SS server process)"
20 echo " $0 stop (stop Firebird SS server process)"
21 echo " "
22 }
23
24 if [ ! -d /usr/local/firebird ]
25 then
26 echo "Firebird SS directory /usr/local/firebird does not exist!"
27 exit 1
28 fi
29
30 case "$mode" in
31
32 'start')
33 echo "trying to start Firebird SS Server.."
34 /usr/bin/su - $RUN_USER -c "$FIREBIRD/bin/fbmgr -start -forever"
35 ;;
36
37 'stop')
38 echo "trying to stop Firebird SS Server.."
39 su - $RUN_USER -c "$FIREBIRD/bin/fbmgr -shut -user $ISC_USER -pass $ISC_PASSWORD"
40
41 ;;
42
43 *)
44 usage_error
45 exit 1
46 ;;
47 esac
48
49 exit 0