#!/bin/sh

. "$(dirname "$(readlink -f "$0")")"/../../ovirt-engine/bin/engine-prolog.sh

exec "${JAVA_HOME}/bin/java" \
	-Djava.security.auth.login.config="${ENGINE_USR}/conf/jaas.conf" \
	-Djava.util.logging.config.file="${OVIRT_LOGGING_PROPERTIES}" \
	-Djboss.modules.write-indexes=false \
	-Dorg.ovirt.engine.aaa.jdbc.programName="${0}" \
	-jar "${JBOSS_HOME}/jboss-modules.jar" \
	-dependencies org.ovirt.engine.extension.aaa.jdbc \
	-class org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli \
	"$@"

#!/bin/sh

ENGINE_PROLOG="${ENGINE_PREFIX:-$(dirname $0)/..}/share/ovirt-engine/bin/engine-prolog.sh"
if [ ! -f ${ENGINE_PROLOG} ]; then
    echo \
"Cannot locate engine-prolog.sh, please specify oVirt engine installation \
prefix. For example:

  ENGINE_PREFIX=\$HOME/ovirt-engine ovirt-aaa-jdbc-tool

"
    exit -1
fi

. "${ENGINE_PROLOG}"

exec "${JAVA_HOME}/bin/java" \
	-Djava.security.auth.login.config="${ENGINE_USR}/conf/jaas.conf" \
	-Djava.util.logging.config.file="${OVIRT_LOGGING_PROPERTIES}" \
	-Djboss.modules.write-indexes=false \
	-Dorg.ovirt.engine.aaa.jdbc.programName="${0}" \
	-jar "${JBOSS_HOME}/jboss-modules.jar" \
	-dependencies org.ovirt.engine.extension.aaa.jdbc \
	-class org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli \
	"$@"

Enable specifying custom engine prefix
cli: Enable specifying custom engine prefix

If oVirt engine is installed in development environment, user needs
to specify installation prefix using ENGINE_PREFIX variable. For
example:

  ENGINE_PREFIX=$HOME/ovirt-engine ovirt-aaa-jdbc-tool

Change-Id: If74a17c4cd31681205dd750ad387c47b96fe4a1b
Signed-off-by: Martin Perina <7bf83f5b771f1cc16b652b5fe02fa33310bda7b0@redhat.com>
