#!/sbin/sh
##################################
# Product: eG
# Fileset: bin
# postremove
# @ (#) $Revision: 2.5 $
#####################################
#
# (c) Copyright eG Innovations, 2003
#
######################################

PATH=$SW_PATH:/sbin:/usr/bin:/usr/ccs/sbin
export PATH
# stoping the eGurkha Agent
echo "Stopping the eG Agent ... "
/opt/egurkha/bin/stop_agent

# Removing Auto restart feature of the eG agent
echo "Removing auto restart feature for the eG Agent ... "
/opt/egurkha/bin/auto_restart uninstall

echo "Removing /opt/egurkha/bin from the /etc/PATH..."

mv /etc/PATH /etc/PATH.old

sed 's| :/opt/egurkha/bin||g' < /etc/PATH.old >/etc/PATH

rm -rf /opt/egurkha

if [ -f /etc/PATH ]
then rm -f /etc/PATH.old
fi
