#!/bin/sh # # maui This script will start and stop the MAUI Scheduler # # chkconfig: 345 86 86 # description: maui # # processname: maui # config: /var/spool/maui/maui.cfg # Source the library functions . /etc/rc.d/init.d/functions MAUI_PREFIX=/usr/bin MAUI_CONF="/var/spool/maui/maui.cfg" if [ ! -f $MAUI_CONF ] ; then echo "Cannot find $MAUI_CONF" exit 1 fi # let see how we were called case "$1" in start) echo -n "Starting MAUI Scheduler: " su maui -c ". /etc/rc.d/init.d/functions ; daemon $MAUI_PREFIX/maui" RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/maui echo ;; stop) echo -n "Shutting down MAUI Scheduler: " killproc maui RETVAL=$? [ $RETVAL -eq 0 ] && rm -rf /var/lock/subsys/maui echo ;; status) status maui RETVAL=$? ;; restart) $0 stop $0 start RETVAL=$? ;; reload) echo "Re-reading maui config file" killproc maui -HUP RETVAL=$? ;; *) echo "Usage: maui {start|stop|restart|reload|status}" exit 1 esac