# $Id: postinstall,v 1.1 2004/12/30 23:59:42 elkner Exp $

if [ -z "$PKG_INSTALL_ROOT" ]; then
        BASE=$CLIENT_BASEDIR
else    
        BASE=${PKG_INSTALL_ROOT}$CLIENT_BASEDIR
fi

CFS=" conf/catalina.policy conf/catalina.properties conf/context.xml conf/logging.properties conf/tomcat-users.xml conf/web.xml conf/server.xml"

for f in $CFS; do
	if [ ! -r ${BASE}/tomcat60/$f ]; then
		cp -p ${BASE}/tomcat60/${f}.default ${BASE}/tomcat60/${f}
		chown webservd:webservd ${BASE}/tomcat60/${f}
	fi
done
if [ ! -f ${BASE}/tomcat60/bin/setenv.sh ]; then
	cp -p ${BASE}/tomcat60/bin/setenv.sh.default ${BASE}/tomcat60/bin/setenv.sh
fi

echo " "
echo "Please read ${BASE}/tomcat60/README.FIRST.txt for runtime tweakings!"

