#!/bin/sh
#
# pbs_sched	This script will start and stop the TORQUE Scheduler
#
# chkconfig: 345 85 85
# description: TORQUE is a batch versatile batch system for SMPs and clusters
#
# Source the library functions
. /etc/rc.d/init.d/functions

PBS_PREFIX=/opt/pbs

# let see how we were called
case "$1" in
	start) 
		gprintf "Starting TORQUE Scheduler: "
		daemon $PBS_PREFIX/sbin/pbs_sched
		echo
		;;
	stop)
		gprintf "Shutting down TORQUE Scheduler: "
		killproc pbs_sched
		echo
		;;
	status)
		status pbs_sched
		;;
	restart)
		$0 stop
		$0 start
		;;
	*)
		gprintf "Usage: pbs_sched {start|stop|restart|status}\n"
		exit 1
esac
