#!/bin/sh
# quickml       This shell script takes care of starting and stopping
#               quickml.
#
# chkconfig: - 25 85 
# description: QuickML server
# processname: quickml
# pidfile: /var/run/quickml.pid

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

usage ()
{
    echo "Usage: $0 {start|stop|restart|condrestart}"
    exit 1
}

start() {
	echo -n "Starting QuickML services: "
	daemon /usr/sbin/quickml && success || failure
	echo
}

stop() {
	echo -n "Stopping QuickML services: "
	killproc /usr/sbin/quickml
	echo
}

case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  restart)
	stop
	sleep 1
	start
	;;
  condrestart)
        if [ -f /var/run/quickml.pid ]; then
	    stop
	    sleep 1
	    start
	fi
        ;;
  *)
	echo "Usage: quickml {start|stop|restart|condrestart}"
	exit 1
esac

exit 0
