Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > a0d86e6e0458f60c5f98ece180b9f440 > files > 2

bayonnedb-0.2.0-3mdk.i586.rpm

#!/bin/sh
#
# bayonne         This shell script takes care of starting and stopping
#		  a bayonne server running as a system service.
#
# chkconfig: 2345 97 9
# description: Bayonnedb offers realtime telephony database services.

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/sbin/named ] || exit 0

[ -f /etc/named.conf ] || exit 0

RETVAL=0

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        gprintf "Starting bayonnedb: "
        daemon bayonnedb -D
	RETVAL=$?
 	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bayonnedb
	echo
        ;;
  stop)
        # Stop daemons.
        gprintf "Shutting down bayonnedb: "
        killproc bayonnedb
	RETVAL=$?
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bayonnedb
        echo
        ;;
  status)
	status bayonnedb
	exit $?
	;;
  restart)
	$0 stop
	$0 start
	;;
  *)
        gprintf "Usage: bayonnedb {start|stop|status|restart}\n"
        exit 1
esac

exit $RETVAL