#!/bin/sh
# @(#)postremove 1.0 03/03/21 SMI
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
# postremove script to restart the documentation server

# Check to see if SUNWab2u is installed, if not, exit.
AB2DIR=`pkgparam SUNWab2u BASEDIR 2>> /dev/null`
if [ "$AB2DIR" = "" ]
then
	exit 0
fi

# Check to see if ab2admin is installed, if not, exit.
AB2BIN=${AB2DIR}/lib/ab2/bin
export AB2BIN
if [ ! -x ${AB2BIN}/ab2admin ]
then
   exit 0
fi

# Stop and restart the documentation server
cmd1="${AB2BIN}/ab2admin -o stop"
cmd2="${AB2BIN}/ab2admin -o start"
echo "Restarting the documentation server"
echo "$cmd1"
eval $cmd1
echo "$cmd2"
eval $cmd2

exit 0
