#!/bin/sh

. ./env.sh

if [ -d ${DOMAIN_DIR} ]; then
  echo "Domain dir ${DOMAIN_DIR} already exists, skipping unpack"
else
  sh ${MW_HOME}/oracle_common/common/bin/unpack.sh -template=${TEMPLATE_FILE} -domain=${DOMAIN_DIR} -user_name=weblogic -password=welcome1 -log=unpack-elasticity.log -log_priority=info
fi

echo "Copying console preferences into place"
mkdir -p ${DOMAIN_DIR}/servers/AdminServer/data/console
cp ConsolePreferences.xml ${DOMAIN_DIR}/servers/AdminServer/data/console
