#!/bin/ksh

# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident  "@(#)postbackout 1.5     05/04/03 SMI"


##############################################################
#
# STEP 1: Reinstall the old application
# This is equivalent to a postinstall 
#
##############################################################

BIN_DIR=/usr/sbin
SMREG=$BIN_DIR/smreg
SMCWEBSERVER=$BIN_DIR/smcwebserver

APPNAME=se6920ui
INSTALLDIR=/usr/share/webconsole
WEBAPPDIR=$INSTALLDIR/$APPNAME

PROCOUT=/tmp/procout.$$

fatal ()
{
    echo "$*" >&2
    exit 3
}

# Register the application with Lockhart
#
[ -x $SMREG ] || fatal "Sun Web Console registration tool ($SMREG) is not available!"

$SMREG add -a $WEBAPPDIR || fatal "Unable to register the web application!"


# Restart System 1 processes
#
if [ -x /opt/se6x20/bin/restart_se6000 ]
then
    /opt/se6x20/bin/restart_se6000 
fi

echo "-------postbackout completed--------"

exit 0
