2010-11-04 02:46:38 +07:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2012-06-06 21:13:34 +07:00
|
|
|
# $Id: RUN_ImportIdempiere.sh,v 1.9 2005/01/22 21:59:15 jjanke Exp $
|
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
|
2020-09-09 00:37:00 +07:00
|
|
|
export ID_ENV=Server
|
|
|
|
. ./myEnvironment.sh
|
|
|
|
echo Import idempiere - "$IDEMPIERE_HOME" \("$ADEMPIERE_DB_NAME"\)
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
SUFFIX=""
|
|
|
|
SYSUSER=system
|
2020-09-09 00:37:00 +07:00
|
|
|
if [ "$ADEMPIERE_DB_PATH" = "postgresql" ]
|
2010-11-04 02:46:38 +07:00
|
|
|
then
|
|
|
|
SUFFIX="_pg"
|
|
|
|
SYSUSER=postgres
|
|
|
|
fi
|
|
|
|
|
2020-09-09 00:37:00 +07:00
|
|
|
echo Re-Create idempiere User and import "$IDEMPIERE_HOME"/data/Adempiere${SUFFIX}.dmp - \("$ADEMPIERE_DB_NAME"\)
|
|
|
|
echo "== The import will show warnings. This is OK =="
|
|
|
|
cd "$IDEMPIERE_HOME"/data/seed || exit
|
2012-05-29 06:27:41 +07:00
|
|
|
jar xvf Adempiere${SUFFIX}.jar
|
2020-09-09 00:37:00 +07:00
|
|
|
cd "$IDEMPIERE_HOME"/utils || exit
|
|
|
|
ls -lsa "$IDEMPIERE_HOME"/data/seed/Adempiere${SUFFIX}.dmp
|
2010-11-04 02:46:38 +07:00
|
|
|
echo Press enter to continue ...
|
2020-09-09 00:37:00 +07:00
|
|
|
read -r _
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
# Parameter: <systemAccount> <AdempiereID> <AdempierePwd>
|
|
|
|
# globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres(ignored in oracle)
|
2020-09-09 00:37:00 +07:00
|
|
|
"$ADEMPIERE_DB_PATH"/ImportIdempiere.sh "$SYSUSER/$ADEMPIERE_DB_SYSTEM" "$ADEMPIERE_DB_USER" "$ADEMPIERE_DB_PASSWORD" "$ADEMPIERE_DB_SYSTEM" "$SUFFIX"
|
2021-01-25 13:14:08 +07:00
|
|
|
|
|
|
|
./RUN_SyncDB.sh
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
./sign-database-build-alt.sh
|