#!/bin/bash

# chkconfig: 2345 87 13
# description: Spong client check program

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

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

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

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting spong-client: "
        /usr/local/spong/bin/spong-client 
        echo
        touch /var/lock/subsys/spong-client
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down spong-client: "
	killproc spong-client
        killall spong-client
        echo
        rm -f /var/lock/subsys/spong-client
        ;;
  status)
	status spong-client
	;;
  restart|reload)
	$0 stop
	$0 start
	;;
  *)
        echo "Usage: spong-client {start|stop|restart|reload|status}"
        exit 1
esac

exit 0
