#!/bin/sh # # pbs_sched This script will start and stop the PBS daemons # # chkconfig: 345 85 85 # description: PBS is a batch versitle batch system for SMPs and clusters # # Source the library functions . /etc/rc.d/init.d/functions # let see how we were called case "$1" in start) if [ ! -f /var/lock/subsys/pbs_sched ]; then msg_starting "pbs_sched" daemon /usr/sbin/pbs_sched RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pbs_sched else msg_already_running "pbs_sched" fi ;; stop) if [ -f /var/lock/subsys/pbs_sched ]; then msg_stopping "pbs_sched" killproc pbs_sched rm -rf /var/lock/subsys/pbs_sched >/dev/null 2>&1 else msg_not_running pbs_sched exit 1 fi ;; status) status pbs_sched ;; restart) $0 stop $0 start ;; *) msg_usage "$0 {start|stop|status|restart|reload|force-reload}" exit 1 esac exit $RETVAL