LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File firebird-2.5.2-init.patch of Package firebird (Project openSUSE:Factory)

diff -up builds/install/arch-specific/linux/misc/firebird.init.d.suse.in.orig-init builds/install/arch-specific/linux/misc/firebird.init.d.suse.in
--- builds/install/arch-specific/linux/misc/firebird.init.d.suse.in.orig-init	2012-03-07 13:09:25.000000000 +0100
+++ builds/install/arch-specific/linux/misc/firebird.init.d.suse.in	2012-05-08 21:23:26.442458020 +0200
@@ -17,6 +17,7 @@
 # Required-Stop:  
 # 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