#!/sbin/sh
# 
# $Copyright
# Copyright 1993, 1994, 1995  Intel Corporation
# INTEL CONFIDENTIAL
# The technical data and computer software contained herein are subject
# to the copyright notices; trademarks; and use and disclosure
# restrictions identified in the file located in /etc/copyright on
# this system.
# Copyright$
# 
#
# Copyright (c) 1992-1995, Locus Computing Corporation
# Copyright (c) 1993, Intel Corporation
# All rights reserved
#
#

PATH=/sbin:/usr/sbin:/usr/bin
export PATH

case "$1" in
'start')

	#
	# Invoke the load leveler daemon if the binary exists.
	#
	if /usr/sbin/load_leveld -s ; then
        	echo "Load leveler service started"
	else
		echo "Unable to provide load leveler service"
	fi

	;;
'stop')
	#
	# Kill the load leveler
	#
	pid=`/bin/ps -e -o pid,ucomm,pgid | grep load_leveld | sort -un +2 | awk '{print $1}'`
	if [ "X$pid" != "X" ]
	then
		/bin/kill $pid
	fi
	;;
*)
	echo "usage: $0 {start|stop}"
esac
