#!/usr/bin/qsh
#
# All Rights Reserved * Licensed Materials - Property of IBM
# 5724-I63, 5724-H88, 5655-N01, 5733-W61 (C) COPYRIGHT International Business Machines Corp., 1997,2007
# US Government Users Restricted Rights - Use, duplication or disclosure
# restricted by GSA ADP Schedule Contract with IBM Corp.
. $(/usr/bin/dirname $0)/setupCmdLine

if [ -e ${USER_INSTALL_ROOT}/configuration/config.ini ]; then
  rm ${USER_INSTALL_ROOT}/configuration/config.ini
fi

java ${JAVA_PARM} \
  org.eclipse.core.launcher.Main -clean -nosplash -application com.ibm.ws.debug.osgi.Noop

if [ -e ${USER_INSTALL_ROOT}/configuration ]; then
  chmod -R o=rwx ${USER_INSTALL_ROOT}/configuration
  chown -R QEJBSVR ${USER_INSTALL_ROOT}/configuration
else
  if [ -e ${WAS_INSTALL_ROOT}/configuration ]; then
    chmod -R o=rwx ${WAS_INSTALL_ROOT}/configuration
    chown -R QEJBSVR ${WAS_INSTALL_ROOT}/configuration
  fi
fi
if [ -e ${USER_INSTALL_ROOT}/temp/osgi_instance_location ]; then
  chmod -R o=rwx ${USER_INSTALL_ROOT}/temp/osgi_instance_location
  chown -R QEJBSVR ${USER_INSTALL_ROOT}/temp/osgi_instance_location
fi
if [ -e ${WAS_INSTALL_ROOT}/temp/osgi_instance_location ]; then
  chmod -R o=rwx ${WAS_INSTALL_ROOT}/temp/osgi_instance_location
  chown -R QEJBSVR ${WAS_INSTALL_ROOT}/temp/osgi_instance_location
fi