Debian Codegraph @

builds/install/arch-specific/linux/firebird.init.d.gentoo.in

raw
1 #!/sbin/openrc-run
2 #Gentoo Linux OpenRC
3 # description: Start/Stop firebird database server
4 #
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 fb_install_prefix=@prefix@
10
11 # To run more instances of firebird:
12 # Copy @prefix@ somewhere
13 # Copy this script under a new name
14 # Change INSTANCE and FIREBIRD below (all instance names should be unique)
15 # Edit the copied firebird.conf to change at least RemoteServicePort
16 # Optionally run rc-update to autostart the new service
17 INSTANCE=default
18 FIREBIRD=@FB_CONFDIR@
19
20 FBRunUser=firebird
21 FBRunGroup=firebird
22
23 fbRunDir=/var/run/firebird
24 fbLockDir=/tmp/firebird
25
26 pidfile="$fbRunDir/$INSTANCE.pid"
27 FULLNAME="firebird server [$INSTANCE]"
28 LD_LIBRARY_PATH=$FIREBIRD/lib:$LD_LIBRARY_PATH
29
30 export FIREBIRD LD_LIBRARY_PATH
31
32 # Normally this 3 lines are not needed, keep them just in case of something VERY starnge
33 ISC_USER=
34 ISC_PASSWORD=
35 export ISC_USER ISC_PASSWORD
36
37 GUARDIAN=$FIREBIRD/bin/fbguard
38 if [ ! -x $GUARDIAN ]; then
39 GUARDIAN=@FB_SBINDIR@/fbguard
40 fi
41
42 command="${GUARDIAN}"
43 command_args="-pidfile ${pidfile} -daemon -forever"
44 start_stop_daemon_args="-p ${pidfile} -u ${FBRunUser}:${FBRunGroup}"
45
46 start_pre() {
47 checkpath -q -d -m 0755 -o ${FBRunUser}:${FBRunGroup} ${fbRunDir} || return 1
48 checkpath -q -d -m 0770 -o ${FBRunUser}:${FBRunGroup} ${fbLockDir} || return 1
49 }
50
51 depend() {
52 need net
53 }
54