File firebird-2.5.2-init.patch of Package firebird
Index: builds/install/arch-specific/linux/misc/firebird.init.d.suse.in
===================================================================
--- builds/install/arch-specific/linux/misc/firebird.init.d.suse.in.orig
+++ builds/install/arch-specific/linux/misc/firebird.init.d.suse.in
@@ -14,9 +14,10 @@
### BEGIN INIT INFO
# Provides: firebird
# Required-Start: $network $remote_fs
-# Required-Stop:
+# Required-Stop: $null
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
+# Short-Description: Firebird SQL server
# Description: Start the Firebird database server.
### END INIT INFO
@@ -42,6 +43,7 @@ test "$START_FIREBIRD" = yes || exit 0
FIREBIRD=@FB_CONFDIR@
FBRunUser=firebird
+FBRunGroup=firebird
INSTANCE=default
makeFbDir() {
@@ -54,14 +56,15 @@ makeFbDir() {
chmod $mode $mDir
fi
fi
- chown $FBRunUser:$FBRunUser $mDir
+ chown $FBRunUser:$FBRunGroup $mDir
}
-runDir=/var/run/firebird
-makeFbDir $runDir
+runDir=@FB_GUARDDIR@
+makeFbDir $runDir 0755
lockDir=/tmp/firebird
makeFbDir $lockDir 0770
pidfile="$runDir/$INSTANCE.pid"
+gpidfile="$runDir/${INSTANCE}-guard.pid"
export FIREBIRD
@@ -115,7 +118,8 @@ case "$1" in
# NOTE: startproc return 0, even if service is
# already running to match LSB spec.
- startproc -u $FBRunUser $FBSBIN/fbguard -pidfile $pidfile -forever
+ startproc -u $FBRunUser $FBSBIN/fbguard -forever \
+ -pidfile $pidfile -gpidfile $gpidfile
# Remember status and be verbose
rc_status -v
@@ -125,13 +129,7 @@ case "$1" in
## Stop daemon with killproc(8) and if this fails
## set echo the echo return value.
- ## I had to use generic approach here - I can't test on suse. AP.
- if [ -f $pidfile ]
- then
- kill `cat $pidfile`
- sleep 1
- fi
-
+ killproc -p $gpidfile ${FBSBIN}/fbguard
# Remember status and be verbose
rc_status -v