8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 14:03:02 +01:00
firebird-mirror/builds/install/arch-specific/linux/misc/firebird.init.d.gentoo.in
alexpeshkoff 0de8b73970 Fix problems with restart on gentoo - start-stop-daemon does not actually
wait for a process to terminate, therefore restart fails sometimes.
2006-11-12 15:25:24 +00:00

47 lines
1.1 KiB
Plaintext

#!/sbin/runscript
#Gentoo Linux RC script
# description: Start/Stop firebird database server
#
# This file belongs in /etc/init.d where it will be run
# on system startup and shutdown to start the background
# Firebird/interbase database server daemon
# Source function library.
. /etc/init.d/functions.sh
FIREBIRD=@prefix@
FBRunUser=firebird
pidfile=/var/run/firebird/`basename $0`.pid
FB_OPTS="-pidfile $pidfile -start -forever"
# NOTE: Normally firebird installation creates /etc/gds_hosts.equiv,
# making it possible normal startup procedure to run.
# In case of manually copying, make sure you have localhost in your
# /etc/gds_hosts.equiv (or hosts.equiv) file.
# See next 2 lines for example of hosts.equiv contents:
#localhost.localdomain
#localhost
export FIREBIRD
MANAGER=$FIREBIRD/bin/fbmgr.bin
start(){
ebegin "Starting firebird server"
start-stop-daemon --oknodo --start --pidfile $pidfile --chuid $FBRunUser --startas $MANAGER -- $FB_OPTS
eend $?
}
stop(){
ebegin "Stopping firebird"
start-stop-daemon --stop --pidfile $pidfile --oknodo
eend $?
}
restart(){
svc_stop
sleep 1
svc_start
}