--- builds/install/arch-specific/linux/misc/firebird.init.d.mandrake.in 2008-01-22 12:39:13.000000000 +0100
+++ builds/install/arch-specific/linux/misc/firebird.init.d.mandrake.in.pm 2009-05-03 12:10:31.000000000 +0200
@@ -19,6 +19,7 @@
# Optionally run chkconfig to autostart the new service
INSTANCE=default
FIREBIRD=@prefix@
+name=firebird
# No changes needed below for multiple instances
FBRunUser=firebird
@@ -37,21 +37,25 @@
case "$1" in
start)
echo -n "Starting $FULLNAME "
- echo $MANAGER -pidfile $pidfile -start -forever | su $FBRunUser
+ daemon --user=$FBRunUser $MANAGER -pidfile $pidfile -start -forever
RETVAL=$?
- [ $RETVAL -eq 0 ] && success || failure
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$name
echo
;;
stop)
- echo -n "Stopping $FULLNAME "
-
if [ -f $pidfile ]
then
- kill `cat $pidfile`
+ echo -n "Stopping $FULLNAME: "
+ killproc -p $pidfile $name
+ RETVAL=$?
+ echo
+ else
+ echo -n "$FULLNAME server is stopped"
+ echo
fi
RETVAL=$?
- [ $RETVAL -eq 0 ] && success || failure
- echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$name
;;
status)
if [ -f $pidfile ]
@@ -70,7 +75,7 @@
RETVAL=$?
;;
*)
- echo "Usage: firebird {start|stop|status|restart|reload}"
+ echo "Usage: $name {start|stop|status|restart|reload}"
exit 1
esac