Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a41580ae846adc08db53ba5df3f59415 > files > 1

maui-3.2.5-16mdk.ppc.rpm

#!/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
gprintf "Cannot find %s\n" "$MAUI_CONF"
exit 1
fi

# let see how we were called
case "$1" in
	start) 
		gprintf "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)
		gprintf "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)
		gprintf "Re-reading maui config file\n"
                killproc maui -HUP
                RETVAL=$?
		;;
	*)
		gprintf "Usage: maui {start|stop|restart|reload|status}\n"
		exit 1
esac