2010-11-04 02:46:38 +07:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# $Id: RUN_Env.sh,v 1.16 2005/01/22 21:59:15 jjanke Exp $
|
2012-06-06 21:13:34 +07:00
|
|
|
echo idempiere Environment Check
|
2010-11-04 02:46:38 +07:00
|
|
|
|
2020-09-09 00:37:00 +07:00
|
|
|
if [ "$IDEMPIERE_HOME" ]; then
|
|
|
|
cd "$IDEMPIERE_HOME"/utils || (echo "Cannot cd $IDEMPIERE_HOME/utils"; exit 1)
|
2010-11-04 02:46:38 +07:00
|
|
|
fi
|
|
|
|
# Environment is read from the following script myEnvironment.sh
|
|
|
|
. ./myEnvironment.sh
|
|
|
|
|
|
|
|
echo General ...
|
2020-09-09 00:37:00 +07:00
|
|
|
echo PATH = "$PATH"
|
|
|
|
echo CLASSPTH = "$CLASSPATH"
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
echo .
|
|
|
|
echo Homes ...
|
2020-09-09 00:37:00 +07:00
|
|
|
echo IDEMPIERE_HOME = "$IDEMPIERE_HOME"
|
|
|
|
echo JAVA_HOME = "$JAVA_HOME"
|
|
|
|
echo ADEMPIERE_DB_URL = "$ADEMPIERE_DB_URL"
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
echo .
|
|
|
|
echo Database ...
|
2020-09-09 00:37:00 +07:00
|
|
|
echo ADEMPIERE_DB_USER = "$ADEMPIERE_DB_USER"
|
|
|
|
echo ADEMPIERE_DB_PASSWORD = "$ADEMPIERE_DB_PASSWORD"
|
|
|
|
echo ADEMPIERE_DB_PATH = "$ADEMPIERE_DB_PATH"
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
echo .. Oracle specifics
|
2020-09-09 00:37:00 +07:00
|
|
|
echo ADEMPIERE_DB_NAME = "$ADEMPIERE_DB_NAME"
|
|
|
|
echo ADEMPIERE_DB_SYSTEM = "$ADEMPIERE_DB_SYSTEM"
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
echo .
|
2012-06-06 21:13:34 +07:00
|
|
|
echo Java Test ... should be 1.6+
|
2020-09-09 00:37:00 +07:00
|
|
|
"$JAVA_HOME"/bin/java -version
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
echo .
|
|
|
|
echo Database Connection Test \(1\) ... TNS
|
2020-09-09 00:37:00 +07:00
|
|
|
echo Running tnsping "$ADEMPIERE_DB_NAME"
|
|
|
|
tnsping "$ADEMPIERE_DB_NAME"
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
echo .
|
|
|
|
echo Database Connection Test \(2\)... System
|
2020-09-09 00:37:00 +07:00
|
|
|
echo Running sqlplus system/"$ADEMPIERE_DB_SYS"@"$ADEMPIERE_DB_NAME" @"$ADEMPIERE_DB_PATH"/Test.sql
|
|
|
|
sqlplus system/"$ADEMPIERE_DB_SYSTEM"@"$ADEMPIERE_DB_NAME" @"$ADEMPIERE_DB_HOME"/Test.sql
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
echo .
|
|
|
|
echo Checking Database Size \(3\)
|
2020-09-09 00:37:00 +07:00
|
|
|
sqlplus system/"$ADEMPIERE_DB_SYSTEM"@"$ADEMPIERE_DB_NAME" @"$ADEMPIERE_DB_HOME"/CheckDB.sql "$ADEMPIERE_DB_USER"
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
echo .
|
2020-09-09 00:37:00 +07:00
|
|
|
echo "== It is ok for the next to fail before the iDempiere Database Import Step =="
|
|
|
|
echo Database Connection Test \(4\) ... iDempiere \(May not work, if not user not yet imported\)
|
|
|
|
sqlplus "$ADEMPIERE_DB_USER"/"$ADEMPIERE_DB_PASSWORD"@"$ADEMPIERE_DB_NAME" @"$ADEMPIERE_DB_HOME"/Test.sql
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
echo .
|
|
|
|
echo Done
|
|
|
|
|