2010-11-04 02:46:38 +07:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $Id: RUN_ImportReference.sh,v 1.11 2005/12/13 00:17:54 jjanke Exp $
|
|
|
|
|
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 Reference - "$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 Reference User and import "$IDEMPIERE_HOME"/data/Adempiere.dmp - \("$ADEMPIERE_DB_NAME"\)
|
|
|
|
echo "== The import will show warnings. This is OK =="
|
|
|
|
ls -lsa "$IDEMPIERE_HOME"/data/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>
|
2020-09-09 00:37:00 +07:00
|
|
|
sh "$ADEMPIERE_DB_PATH"/ImportIdempiere.sh $SYSUSER/"$ADEMPIERE_DB_SYSTEM" reference reference "$ADEMPIERE_DB_SYSTEM"
|