8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 01:23:03 +01:00
firebird-mirror/builds/install/arch-specific/linux/misc/firebird.init.d.gentoo.in

48 lines
1.2 KiB
Plaintext
Raw Normal View History

2003-11-07 15:18:41 +01:00
#!/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
2007-11-19 14:21:51 +01:00
# To run more instances of firebird:
# Copy /opt/firebird somewhere
# Copy this script under a new name
# Change INSTANCE and FIREBIRD below (all instance names should be unique)
# Edit the copied firebird.conf to change at least RemoteServicePort
# Optionally run rc-update to autostart the new service
INSTANCE=default
2003-11-07 15:18:41 +01:00
FIREBIRD=@prefix@
2007-11-19 14:21:51 +01:00
2003-11-07 15:18:41 +01:00
FBRunUser=firebird
2007-11-19 14:21:51 +01:00
pidfile=/var/run/firebird/$INSTANCE.pid
FULLNAME="firebird server [$INSTANCE]"
LD_LIBRARY_PATH=$FIREBIRD/lib
2006-04-16 14:58:29 +02:00
FB_OPTS="-pidfile $pidfile -start -forever"
2007-11-19 14:21:51 +01:00
export FIREBIRD LD_LIBRARY_PATH
2003-11-07 15:18:41 +01:00
MANAGER=$FIREBIRD/bin/fbmgr.bin
2006-04-16 14:58:29 +02:00
start(){
2007-11-19 14:21:51 +01:00
ebegin "Starting $FULLNAME"
2006-04-16 14:58:29 +02:00
start-stop-daemon --oknodo --start --pidfile $pidfile --chuid $FBRunUser --startas $MANAGER -- $FB_OPTS
eend $?
}
stop(){
2007-11-19 14:21:51 +01:00
ebegin "Stopping $FULLNAME"
2006-04-16 14:58:29 +02:00
start-stop-daemon --stop --pidfile $pidfile --oknodo
eend $?
}
restart(){
svc_stop
sleep 1
svc_start
}