#!/bin/sh
#
# Copyright 01/28/00 Sun Microsystems, Inc. All Rights Reserved.
#pragma ident  "@(#)wbemunconfig.sh	1.17 00/01/28 Sun Microsystems"
#
ECHO=/usr/bin/echo
#
#

set `/usr/bin/id`
if [ $1 != "uid=0(root)" ]; then
        $ECHO "You must be root to run this command"
        exit 1
fi

#--------------
# Use pid files to stop  cimomboot, cimom object manager

	for daemon in cimbootserver cimomserver ; do
		pidfile=/var/sadm/wbem/logr/$daemon.pid
		if [ -f $pidfile ]; then
			pid=`/usr/bin/cat $pidfile`
			[ "$pid" -gt 0 ] && kill $pid >/dev/null 2>&1
			rm -f $pidfile
		fi
	done

#
#/usr/bin/rm -rf /var/sadm/wbem/logr

#
exit 0









