utils folder move to server feature project.

This commit is contained in:
Heng Sin Low 2010-11-08 10:19:41 +08:00
parent 87736cd7de
commit 8dfef2178e
104 changed files with 0 additions and 3311 deletions

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>utils</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

View File

@ -1,53 +0,0 @@
@Title Adempiere Client %ADEMPIERE_HOME% %1%
@Rem $Id: RUN_Adempiere.bat,v 1.24 2005/08/24 22:50:37 jjanke Exp $
@Echo off
@Rem Set/Overwrite ADEMPIERE_HOME/JAVA_HOME
@Rem explicitly here for different versions, etc. e.g.
@Rem
@Rem SET ADEMPIERE_HOME=C:\R251\Adempiere
@Rem SET JAVA_HOME=C:\j2sdk1.4.2_06
:CHECK_JAVA:
@if not "%JAVA_HOME%" == "" goto JAVA_HOME_OK
@Set JAVA=java
@Echo JAVA_HOME is not set.
@Echo You may not be able to start Adempiere
@Echo Set JAVA_HOME to the directory of your local JDK.
@Echo You could set it via WinEnv.js e.g.:
@Echo cscript WinEnv.js C:\Adempiere C:\j2sdk1.4.2_06
@goto CHECK_ADEMPIERE
:JAVA_HOME_OK
@Set JAVA=%JAVA_HOME%\bin\java
:CHECK_ADEMPIERE
@if not "%ADEMPIERE_HOME%" == "" goto ADEMPIERE_HOME_OK
set ADEMPIERE_HOME=%~dp0..
@Echo ADEMPIERE_HOME is not set.
@Echo You may not be able to start Adempiere
@Echo Set ADEMPIERE_HOME to the directory of Adempiere.
@Echo You could set it via WinEnv.js e.g.:
@Echo cscript WinEnv.js C:\Adempiere C:\j2sdk1.4.2_08
@goto MULTI_INSTALL
:ADEMPIERE_HOME_OK
:MULTI_INSTALL
@REM To switch between multiple installs, copy the created Adempiere.properties file
@REM Select the configuration by setting the PROP variable
@SET PROP=
@Rem SET PROP=-DPropertyFile=C:\test.properties
@REM Alternatively use parameter
@if "%1" == "" goto ENCRYPTION
@SET PROP=-DPropertyFile=%1
:ENCRYPTION
@Rem To use your own Encryption class (implementing org.compiere.util.SecureInterface),
@Rem you need to set it here (and in the server start script) - example:
@Rem SET SECURE=-DADEMPIERE_SECURE=org.compiere.util.Secure
@SET SECURE=
:START
@"%JAVA%" -Xms32m -Xmx512m -Dosgi.compatibility.bootdelegation=true -DADEMPIERE_HOME=%ADEMPIERE_HOME% %PROP% %SECURE% -jar %ADEMPIERE_HOME%/osgi/org.eclipse.osgi_3.6.0.v20100517.jar -clean -console -install %ADEMPIERE_HOME%/osgi -configuration %ADEMPIERE_HOME%/osgi/client -application org.adempiere.Client
@Rem @sleep 15
@CHOICE /C YN /T 15 /D N > NUL

View File

@ -1,45 +0,0 @@
#!/bin/sh
#
# $Id: RUN_Adempiere.sh,v 1.18 2005/07/21 16:44:54 jjanke Exp $
echo Adempiere Client $ADEMPIERE_HOME
# Set directly to overwrite
#ADEMPIERE_HOME=/Adempiere
#JAVA_HOME=/usr/lib/java
## Check Java Home
if [ $JAVA_HOME ]; then
JAVA=$JAVA_HOME/bin/java
else
JAVA=java
echo JAVA_HOME is not set.
echo You may not be able to start Adempiere
echo Set JAVA_HOME to the directory of your local JDK.
fi
## Check Adempiere Home
if [ $ADEMPIERE_HOME ]; then
CLASSPATH=$ADEMPIERE_HOME/lib/Adempiere.jar:$ADEMPIERE_HOME/lib/AdempiereCLib.jar:$ADEMPIERE_HOME/lib/CompiereJasperReqs.jar:$CLASSPATH
else
CLASSPATH=lib/Adempiere.jar:lib/AdempiereCLib.jar:lib/CompiereJasperReqs.jar:$CLASSPATH
echo ADEMPIERE_HOME is not set
echo You may not be able to start Adempiere
echo Set ADEMPIERE_HOME to the directory of Adempiere.
fi
# Check Argument
if [ $1 ]; then
PROP=-DPropertyFile=$1
else
PROP=
fi
# To use your own Encryption class (implementing org.compiere.util.SecureInterface),
# you need to set it here (and in the server start script) - example:
# SECURE=-DADEMPIERE_SECURE=org.compiere.util.Secure
SECURE=
# OSGi:
$JAVA -Xms32m -Xmx512m -Dosgi.compatibility.bootdelegation=true -DADEMPIERE_HOME=$ADEMPIERE_HOME $PROP $SECURE -jar $ADEMPIERE_HOME/osgi/org.eclipse.osgi_3.6.0.v20100517.jar -clean -console -install $ADEMPIERE_HOME/osgi -configuration $ADEMPIERE_HOME/osgi/client -application org.adempiere.Client

View File

@ -1,15 +0,0 @@
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Export Adempiere Database - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@Rem
@Rem $Id: RUN_DBExport.bat,v 1.16 2005/04/27 17:45:02 jjanke Exp $
@Rem
@Rem Parameter: <adempiereDBuser>/<adempiereDBpassword>
@call %ADEMPIERE_DB_PATH%\DBExport %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD%
@Rem call %ADEMPIERE_DB_PATH%\DBExportFull system %ADEMPIERE_DB_SYSTEM%
@Echo If the following statement fails, fix your environment
IF (%ADEMPIERE_HOME%) == () (CALL myDBcopy.bat) else (CALL %ADEMPIERE_HOME%\utils\myDBcopy.bat)
@Rem Sleep 60
@CHOICE /C YN /T 60 /D N > NUL

View File

@ -1,21 +0,0 @@
#!/bin/sh
# Author + Copyright 1999-2005 Jorg Janke
# $Id: RUN_DBExport.sh,v 1.10 2005/05/31 18:45:33 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Export Adempiere Database - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
# Parameter: <adempiereDBuser>/<adempiereDBpassword>
sh $ADEMPIERE_DB_PATH/DBExport.sh $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD
# sh $ADEMPIERE_DB_PATH/DBExportFull system $ADEMPIERE_DB_SYSTEM
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
sh myDBcopy.sh

View File

@ -1,18 +0,0 @@
@Rem $Id: RUN_DBRestore.bat,v 1.13 2005/01/22 21:59:15 jjanke Exp $
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Restore Adempiere Database from Export - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@echo Re-Create Adempiere User and import %ADEMPIERE_HOME%\data\ExpDat.dmp
@dir %ADEMPIERE_HOME%\data\ExpDat.dmp
@echo == The import will show warnings. This is OK ==
@pause
@Rem Parameter: <systemAccount> <adempiereID> <adempierePwd>
@Rem globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres (ignored in oracle)
@call %ADEMPIERE_DB_PATH%\DBRestore system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% %ADEMPIERE_DB_SYSTEM%
@Call %ADEMPIERE_HOME%\utils\RUN_SignDatabaseBuild.bat > NUL 2>&1
@pause

View File

@ -1,21 +0,0 @@
#!/bin/sh
# $Id: RUN_DBRestore.sh,v 1.9 2005/01/22 21:59:15 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Restore Adempiere Database from Export- $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
echo Re-Create Adempiere User and import $ADEMPIERE_HOME/data/ExpDat.dmp
echo == The import will show warnings. This is OK ==
ls -lsa $ADEMPIERE_HOME/data/ExpDat.dmp
echo Press enter to continue ...
read in
# Parameter: <systemAccount> <adempiereID> <adempierePwd>
# globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres(ignored in oracle)
$ADEMPIERE_DB_PATH/DBRestore.sh system/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD $ADEMPIERE_DB_SYSTEM
$ADEMPIERE_HOME/utils/RUN_SignDatabaseBuild.sh

View File

@ -1,10 +0,0 @@
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Start DataBase Service - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@Rem $Id: RUN_DBStart.bat,v 1.6 2005/01/22 21:59:15 jjanke Exp $
@CALL %ADEMPIERE_DB_PATH%\Start.bat
@Echo Done starting database %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@Rem Sleep 60
@CHOICE /C YN /T 60 /D N > NUL

View File

@ -1,12 +0,0 @@
#!/bin/sh
# $Id: RUN_DBStart.sh,v 1.4 2005/01/22 21:59:15 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Start DataBase Service - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
sh $ADEMPIERE_DB_PATH/Start.sh

View File

@ -1,10 +0,0 @@
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Stop DataBase Service - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@Rem $Id: RUN_DBStop.bat,v 1.5 2005/01/22 21:59:15 jjanke Exp $
@CALL %ADEMPIERE_DB_PATH%\Stop.bat
@Echo Done stopping database %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@Rem Sleep 60
@CHOICE /C YN /T 60 /D N > NUL

View File

@ -1,12 +0,0 @@
#!/bin/sh
# $Id: RUN_DBStop.sh,v 1.4 2005/01/22 21:59:15 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Stop DataBase Service - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
sh $ADEMPIERE_DB_PATH/Stop.sh

View File

@ -1,64 +0,0 @@
@Title Adempiere Environment Check
@Rem $Id: RUN_Env.bat,v 1.16 2005/01/22 21:59:15 jjanke Exp $
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat)
@Echo General ...
@Echo PATH = %PATH%
@Echo CLASSPTH = %CLASSPATH%
@Echo .
@Echo Homes ...
@Echo ADEMPIERE_HOME = %ADEMPIERE_HOME%
@Echo JAVA_HOME = %JAVA_HOME%
@Echo ADEMPIERE_DB_URL = %ADEMPIERE_DB_URL%
@Echo .
@Echo Database ...
@Echo ADEMPIERE_DB_USER = %ADEMPIERE_DB_USER%
@Echo ADEMPIERE_DB_PASSWORD = %ADEMPIERE_DB_PASSWORD%
@Echo ADEMPIERE_DB_PATH = %ADEMPIERE_DB_PATH%
@Echo .. Oracle specifics
@Echo ADEMPIERE_DB_NAME = %ADEMPIERE_DB_NAME%
@Echo ADEMPIERE_DB_SYSTEM = %ADEMPIERE_DB_SYSTEM%
%JAVA_HOME%\bin\java -version
@Echo .
@Echo Java Version should be "1.4.2"
@Echo ---------------------------------------------------------------
@Pause
@Echo .
@Echo ---------------------------------------------------------------
@Echo Database Connection Test (1) ... %ADEMPIERE_DB_NAME%
@Echo If this fails, verify the ADEMPIERE_DB_NAME setting with Oracle Net Manager
@Echo You should see an OK at the end
@Pause
tnsping %ADEMPIERE_DB_NAME%
@Echo .
@Echo ---------------------------------------------------------------
@Echo Database Connection Test (3) ... system/%ADEMPIERE_DB_SYSTEM% in %ADEMPIERE_DB_HOME%
@Echo If this test fails, verify the system password in ADEMPIERE_DB_SYSTEM
@Pause
sqlplus system/%ADEMPIERE_DB_SYSTEM%@%ADEMPIERE_DB_NAME% @%ADEMPIERE_DB_HOME%\Test.sql
@Echo .
@Echo ---------------------------------------------------------------
@Echo Checking Database Size
@Pause
sqlplus system/%ADEMPIERE_DB_SYSTEM%@%ADEMPIERE_DB_NAME% @%ADEMPIERE_DB_HOME%\CheckDB.sql %ADEMPIERE_DB_USER%
@Echo .
@Echo ---------------------------------------------------------------
@Echo Database Connection Test (4) ... %ADEMPIERE_DB_USER%/%ADEMPIERE_DB_PASSWORD%
@Echo This may fail, if you have not imported the Adempiere database yet - Just enter EXIT and run this script again after the import
@Pause
sqlplus %ADEMPIERE_DB_USER%/%ADEMPIERE_DB_PASSWORD%@%ADEMPIERE_DB_NAME% @%ADEMPIERE_DB_HOME%\Test.sql
@Echo .
@Echo Done
@pause

View File

@ -1,57 +0,0 @@
#!/bin/sh
# $Id: RUN_Env.sh,v 1.16 2005/01/22 21:59:15 jjanke Exp $
echo Adempiere Environment Check
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
# Environment is read from the following script myEnvironment.sh
. ./myEnvironment.sh
echo General ...
echo PATH = $PATH
echo CLASSPTH = $CLASSPATH
echo .
echo Homes ...
echo ADEMPIERE_HOME = $ADEMPIERE_HOME
echo JAVA_HOME = $JAVA_HOME
echo ADEMPIERE_DB_URL = $ADEMPIERE_DB_URL
echo .
echo Database ...
echo ADEMPIERE_DB_USER = $ADEMPIERE_DB_USER
echo ADEMPIERE_DB_PASSWORD = $ADEMPIERE_DB_PASSWORD
echo ADEMPIERE_DB_PATH = $ADEMPIERE_DB_PATH
echo .. Oracle specifics
echo ADEMPIERE_DB_NAME = $ADEMPIERE_DB_NAME
echo ADEMPIERE_DB_SYSTEM = $ADEMPIERE_DB_SYSTEM
echo .
echo Java Test ... should be 1.4.1
$JAVA_HOME/bin/java -version
echo .
echo Database Connection Test \(1\) ... TNS
echo Running tnsping $ADEMPIERE_DB_NAME
tnsping $ADEMPIERE_DB_NAME
echo .
echo Database Connection Test \(2\)... System
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
echo .
echo Checking Database Size \(3\)
sqlplus system/$ADEMPIERE_DB_SYSTEM@$ADEMPIERE_DB_NAME @$ADEMPIERE_DB_HOME/CheckDB.sql $ADEMPIERE_DB_USER
echo .
echo == It is ok for the next to fail before the Adempiere Database Import Step ==
echo Database Connection Test \(4\) ... Adempiere \(May not work, if not user not yet imported\)
sqlplus $ADEMPIERE_DB_USER/$ADEMPIERE_DB_PASSWORD@$ADEMPIERE_DB_NAME @$ADEMPIERE_DB_HOME/Test.sql
echo .
echo Done

View File

@ -1,10 +0,0 @@
#!/bin/sh
#
# $Id: RUN_ImportReference.sh,v 1.11 2005/12/13 00:17:54 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Export Reference - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
sh $ADEMPIERE_DB_PATH/ExportReference.sh

View File

@ -1,22 +0,0 @@
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Download Adempiere.jar Database into %ADEMPIERE_HOME%\data
@Rem $Id: RUN_GetAdempiereTemplate.bat,v 1.1 2002/10/08 04:31:20 jjanke Exp $
@Echo Download Adempiere.jar Database into %ADEMPIERE_HOME%\data
@ping @ADEMPIERE_FTP_SERVER@
@cd %ADEMPIERE_HOME%\data
@del Adempiere.jar
@ftp -s:%ADEMPIERE_HOME%\utils\ftpGetAdempiere.txt
@Echo Unpacking ...
@jar xvf Adempiere.jar
@Echo ........ Received
@cd %ADEMPIERE_HOME%\utils
@START RUN_ImportAdempiere.bat
@pause

View File

@ -1,26 +0,0 @@
#!/bin/sh
# Download Adempiere
#
# $Id: RUN_GetAdempiereTemplate.sh,v 1.3 2005/01/22 21:59:15 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Download Adempiere Database - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
echo Download Adempiere Database as jar into $ADEMPIERE_HOME/data
ping @ADEMPIERE_FTP_SERVER@
cd $ADEMPIERE_HOME/data
rm Adempiere.jar
ftp -s:$ADEMPIERE_HOME/utils/ftpGetAdempiere.txt
echo Unpacking
jar xvf Adempiere.jar
echo ........ Received
cd $ADEMPIERE_HOME/utils
sh RUN_ImportAdempiere.sh

View File

@ -1,18 +0,0 @@
@Rem $Id: RUN_ImportAdempiere.bat,v 1.12 2005/01/22 21:59:15 jjanke Exp $
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Import Adempiere - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@echo Re-Create Adempiere User and import %ADEMPIERE_HOME%\data\Adempiere.dmp - (%ADEMPIERE_DB_NAME%)
@dir %ADEMPIERE_HOME%\data\Adempiere.dmp
@echo == The import will show warnings. This is OK ==
@pause
@Rem Parameter: <systemAccount> <AdempiereID> <AdempierePwd>
@Rem globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres (ignored in oracle)
@call %ADEMPIERE_DB_PATH%\ImportAdempiere system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% %ADEMPIERE_DB_SYSTEM%
@call %ADEMPIERE_HOME%\utils\RUN_SignDatabaseBuild > NUL 2>&1
@pause

View File

@ -1,29 +0,0 @@
#!/bin/sh
#
# $Id: RUN_ImportAdempiere.sh,v 1.9 2005/01/22 21:59:15 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Import Adempiere - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
SUFFIX=""
SYSUSER=system
if [ $ADEMPIERE_DB_PATH = "postgresql" ]
then
SUFFIX="_pg"
SYSUSER=postgres
fi
echo Re-Create Adempiere User and import $ADEMPIERE_HOME/data/Adempiere${SUFFIX}.dmp - \($ADEMPIERE_DB_NAME\)
echo == The import will show warnings. This is OK ==
ls -lsa $ADEMPIERE_HOME/data/Adempiere${SUFFIX}.dmp
echo Press enter to continue ...
read in
# Parameter: <systemAccount> <AdempiereID> <AdempierePwd>
# globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres(ignored in oracle)
$ADEMPIERE_DB_PATH/ImportAdempiere.sh $SYSUSER/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD $ADEMPIERE_DB_SYSTEM
$ADEMPIERE_HOME/utils/RUN_SignDatabaseBuild.sh

View File

@ -1,15 +0,0 @@
@Rem $Id: RUN_ImportReference.bat,v 1.11 2005/01/22 21:59:15 jjanke Exp $
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Import Reference - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@echo Re-Create Reference User and import %ADEMPIERE_HOME%\data\Adempiere.dmp - (%ADEMPIERE_DB_NAME%)
@dir %ADEMPIERE_HOME%\data\Adempiere.dmp
@echo == The import will show warnings. This is OK ==
@pause
@Rem Parameter: <systemAccount> <AdempiereID> <AdempierePwd>
@call %ADEMPIERE_DB_PATH%\ImportAdempiere system/%ADEMPIERE_DB_SYSTEM% reference reference
@pause

View File

@ -1,26 +0,0 @@
#!/bin/sh
#
# $Id: RUN_ImportReference.sh,v 1.11 2005/12/13 00:17:54 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Import Reference - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
SUFFIX=""
SYSUSER=system
if [ $ADEMPIERE_DB_PATH = "postgresql" ]
then
SUFFIX="_pg"
SYSUSER=postgres
fi
echo Re-Create Reference User and import $ADEMPIERE_HOME/data/Adempiere.dmp - \($ADEMPIERE_DB_NAME\)
echo == The import will show warnings. This is OK ==
ls -lsa $ADEMPIERE_HOME/data/Adempiere${SUFFIX}.dmp
echo Press enter to continue ...
read in
# Parameter: <systemAccount> <AdempiereID> <AdempierePwd>
sh $ADEMPIERE_DB_PATH/ImportAdempiere.sh $SYSUSER/$ADEMPIERE_DB_SYSTEM reference reference $ADEMPIERE_DB_SYSTEM

View File

@ -1 +0,0 @@
Start /MIN http://www.adempiere.com/wiki/index.php/Migration

View File

@ -1,5 +0,0 @@
#!/bin/sh
#
# mjudd - first attempt - no parsing for different systems / browser etc
/usr/bin/desktop-launch http://www.adempiere.com/wiki/index.php/Migration

View File

@ -1,80 +0,0 @@
#!/bin/sh
#
# $Id: RUN_PostMigration.sh
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
#check java home
if [ $JAVA_HOME ]; then
export PATH=$JAVA_HOME/bin:$PATH
else
echo JAVA_HOME is not set.
echo You may not be able to build Adempiere
echo Set JAVA_HOME to the directory of your local JDK.
exit
fi
# check jdk
if [ ! -f $JAVA_HOME/lib/tools.jar ] ; then
echo "** Need full Java SDK **"
exit
fi
SUFFIX=""
SYSUSER=system
if [ $ADEMPIERE_DB_PATH = "postgresql" ]
then
SUFFIX="_pg"
SYSUSER=postgres
fi
#classpath
MYCLASSPATH=../lib/Adempiere.jar:../lib/CCTools.jar:../lib/postgresql.jar:../lib/oracle.jar:../lib/jboss.jar
JAVA_OPTS="-Xms128m -Xmx512m -Djava.awt.headless=true"
ADEMPIERE_OPTS="-DADEMPIERE_HOME=$ADEMPIERE_HOME -DPropertyFile=../Adempiere.properties"
#Run generate model
#echo
#echo Generate Model
#echo
#
#$JAVA_HOME/bin/java $JAVA_OPTS $ADEMPIERE_OPTS -classpath $MYCLASSPATH org.adempiere.util.GenerateModel src/org/compiere/model org.compiere.model 'D' '%'
#Add missing translations
echo
echo Add missing translations
echo
# Parameter: <systemAccount> <AdempiereID> <AdempierePwd> <SystemPwd>
sh $ADEMPIERE_DB_PATH/PostMigration.sh $SYSUSER/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD $ADEMPIERE_DB_SYSTEM
#Run Synchronize Terminology
echo
echo Synchronize Terminology
echo
$JAVA_HOME/bin/java $JAVA_OPTS $ADEMPIERE_OPTS -classpath $MYCLASSPATH org.compiere.process.SynchronizeTerminology
#Run Role access update
echo
echo Role Access Update
echo
$JAVA_HOME/bin/java $JAVA_OPTS $ADEMPIERE_OPTS -classpath $MYCLASSPATH org.compiere.process.RoleAccessUpdate
#Run Sequence Check
echo
echo Sequence Check
echo
$JAVA_HOME/bin/java $JAVA_OPTS $ADEMPIERE_OPTS -classpath $MYCLASSPATH org.compiere.process.SequenceCheck
echo Done ...
exit 0

View File

@ -1,23 +0,0 @@
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Export Database ExpDat.jar - %ADEMPIERE_HOME%
@Rem $Id: RUN_PutExportTemplate.bat,v 1.3 2002/10/22 14:56:40 jjanke Exp $
@Echo ........ Export DB
@call %ADEMPIERE_DB_PATH%\DBExport %ADEMPIERE_DB_USER%/%ADEMPIERE_DB_PASSWORD%
@Rem Echo ........ Stop DB
@Rem sqlplus "system/%ADEMPIERE_DB_SYSTEM% AS SYSDBA" @%ADEMPIERE_HOME%\utils\%ADEMPIERE_BP_PATH%\Stop.sql
@Title Transafer Database ExpDat.jar - %ADEMPIERE_HOME%\data
@Echo Transfer Database ExpDat.jar - %ADEMPIERE_HOME%\data
@Echo ........ FTP
@ping @ADEMPIERE_FTP_SERVER@
@cd %ADEMPIERE_HOME%\data
@dir ExpDat.*
@ftp -s:%ADEMPIERE_HOME%\utils\ftpPutExport.txt
@Echo ........ Done
@pause

View File

@ -1,25 +0,0 @@
#!/bin/sh
# Transfer Adempiere Database
# $Id: RUN_PutExportTemplate.sh,v 1.3 2005/01/22 21:59:15 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Transfer Adempiere Database - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
Echo ........ Export DB
sh $ADEMPIERE_DB_PATH/DBExport.sh $ADEMPIERE_DB_USER/$ADEMPIERE_DB_PASSWORD
Echo ........ Stop DB
sqlplus "system/$ADEMPIERE_DB_SYSTEM AS SYSDBA" @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Stop.sql
echo ........ FTP
ping @ADEMPIERE_FTP_SERVER@
cd $ADEMPIERE_HOME/data
ls ExpDat.*
ftp -s:$ADEMPIERE_HOME/utils/ftpPutExport.txt
echo ........ Done

View File

@ -1,25 +0,0 @@
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Adempiere Server Start - %ADEMPIERE_HOME% (%ADEMPIERE_APPS_TYPE%)
@Rem $Id: RUN_Server2.bat,v 1.24 2005/10/26 00:38:18 jjanke Exp $
:CHECK_JAVA:
@if not "%JAVA_HOME%" == "" goto JAVA_HOME_OK
@Set JAVA=java
@Echo JAVA_HOME is not set.
@Echo You may not be able to start Adempiere
@Echo Set JAVA_HOME to the directory of your local JDK.
@Echo You could set it via WinEnv.js e.g.:
@Echo cscript WinEnv.js C:\Adempiere C:\j2sdk1.4.2_06
@goto CHECK_ADEMPIERE
:JAVA_HOME_OK
@Set JAVA=%JAVA_HOME%\bin\java
@Rem To use your own Encryption class (implementing org.compiere.util.SecureInterface),
@Rem you need to set it here (and in the client start script) - example:
@Rem SET SECURE=-DADEMPIERE_SECURE=org.compiere.util.Secure
@SET SECURE=
VMARGS="-Dosgi.compatibility.bootdelegation=true -Djava.awt.headless=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true -DADEMPIERE_HOME=%ADEMPIERE_HOME%"
# headless option if you don't have X installed on the server
@"%JAVA%" -server %VMARGS% -jar %ADEMPIERE_HOME%/osgi/org.eclipse.osgi_3.6.0.v20100517.jar -install %ADEMPIERE_HOME%/osgi -configuration %ADEMPIERE_HOME%/osgi/server -clean -console

View File

@ -1,29 +0,0 @@
#!/bin/sh
# ADempiere Server Start
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
## Check Java Home
if [ $JAVA_HOME ]; then
JAVA=$JAVA_HOME/bin/java
else
JAVA=java
echo JAVA_HOME is not set.
echo You may not be able to start Adempiere
echo Set JAVA_HOME to the directory of your local JDK.
fi
# To use your own Encryption class (implementing org.compiere.util.SecureInterface),
# you need to set it here (and in the client start script) - example:
# SECURE=-DADEMPIERE_SECURE=org.compiere.util.Secure
SECURE=
VMARGS="-Dosgi.compatibility.bootdelegation=true -Djava.awt.headless=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true -DADEMPIERE_HOME=$ADEMPIERE_HOME"
# headless option if you don't have X installed on the server
$JAVA -server $VMARGS -jar $ADEMPIERE_HOME/osgi/org.eclipse.osgi_3.6.0.v20100517.jar -install $ADEMPIERE_HOME/osgi -configuration $ADEMPIERE_HOME/osgi/server -clean -console

View File

@ -1,28 +0,0 @@
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Adempiere Server Stop - %ADEMPIERE_HOME%
@Rem $Id: RUN_Server2Stop.bat,v 1.12 2005/09/06 02:46:16 jjanke Exp $
@IF '%ADEMPIERE_APPS_TYPE%' == 'jboss' GOTO JBOSS
@GOTO UNSUPPORTED
:JBOSS
@Set NOPAUSE=Yes
@Set JBOSS_LIB=%JBOSS_HOME%\lib
@Set JBOSS_SERVERLIB=%JBOSS_HOME%\server\adempiere\lib
@Set JBOSS_CLASSPATH=%ADEMPIERE_HOME%\lib\jboss.jar;%JBOSS_LIB%\jboss-system.jar
@CD %JBOSS_HOME%\bin
Call shutdown --server=jnp://%ADEMPIERE_APPS_SERVER%:%ADEMPIERE_JNP_PORT% --shutdown
@Echo Done Stopping Adempiere Apps Server %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@GOTO END
:UNSUPPORTED
@Echo Apps Server stop of %ADEMPIERE_APPS_TYPE% not supported
:END
@Rem Sleep 30
@CHOICE /C YN /T 30 /D N > NUL
@Exit

View File

@ -1,19 +0,0 @@
#!/bin/sh
# ADempiere Server Stop script
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Adempiere Server Stop - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
JBOSS_LIB=$JBOSS_HOME/lib
export JBOSS_LIB
JBOSS_SERVERLIB=$JBOSS_HOME/server/adempiere/lib
export JBOSS_SERVERLIB
JBOSS_CLASSPATH=$ADEMPIERE_HOME/lib/jboss.jar:$JBOSS_LIB/jboss-system.jar:
export JBOSS_CLASSPATH
echo sh $JBOSS_HOME/bin/shutdown.sh --server=jnp://$ADEMPIERE_APPS_SERVER:$ADEMPIERE_JNP_PORT --shutdown
sh $JBOSS_HOME/bin/shutdown.sh --server=jnp://$ADEMPIERE_APPS_SERVER:$ADEMPIERE_JNP_PORT --shutdown

View File

@ -1,14 +0,0 @@
@Title Install Adempiere Server
@Rem $Header: /cvsroot/adempiere/install/Adempiere/RUN_setup.bat,v 1.19 2005/09/08 21:54:12 jjanke Exp $
@Echo off
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat)
@Set JAVA=%JAVA_HOME%\bin\java
@Echo =======================================
@Echo Sign Database Build
@Echo =======================================
@SET CP=%ADEMPIERE_HOME%\lib\CInstall.jar;%ADEMPIERE_HOME%\lib\Adempiere.jar;%ADEMPIERE_HOME%\lib\CCTools.jar;%ADEMPIERE_HOME%\lib\oracle.jar;%ADEMPIERE_HOME%\lib\jboss.jar;%ADEMPIERE_HOME%\lib\postgresql.jar;
@"%JAVA%" -classpath %CP% -DADEMPIERE_HOME=%ADEMPIERE_HOME% org.adempiere.process.SignDatabaseBuild

View File

@ -1,18 +0,0 @@
#!/bin/sh
#
echo Install Adempiere Server
# $Header: /cvsroot/adempiere/install/Adempiere/RUN_setup.sh,v 1.19 2005/09/08 21:54:12 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
JAVA=$JAVA_HOME/bin/java
echo ===================================
echo Sign Database Build
echo ===================================
CP=$ADEMPIERE_HOME/lib/CInstall.jar:$ADEMPIERE_HOME/lib/Adempiere.jar:$ADEMPIERE_HOME/lib/CCTools.jar:$ADEMPIERE_HOME/lib/oracle.jar:$ADEMPIERE_HOME/lib/jboss.jar:$ADEMPIERE_HOME/lib/postgresql.jar:
$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.adempiere.process.SignDatabaseBuild

View File

@ -1,9 +0,0 @@
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Start Adempiere - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@Rem $Id: RUN_Start.bat,v 1.11 2005/01/22 21:59:15 jjanke Exp $
@Echo Starting Database
@CALL %ADEMPIERE_DB_PATH%\Start.bat
@START %ADEMPIERE_HOME%\utils\RUN_Server2.bat

View File

@ -1,9 +0,0 @@
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Stop Adempiere - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@Rem $Id: RUN_Stop.bat,v 1.11 2005/01/22 21:59:15 jjanke Exp $
@CALL %ADEMPIERE_HOME%\utils\RUN_Server2Stop.bat
@CALL %ADEMPIERE_DB_PATH%\Stop.bat

View File

@ -1,14 +0,0 @@
@Rem $Id: RUN_TrlExport.bat,v 1.4 2005/09/16 00:49:37 jjanke Exp $
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Export Translation - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@SET AD_LANGUAGE=de_DE
@SET DIRECTORY=%ADEMPIERE_HOME%\data\%AD_LANGUAGE%
@echo This Procedure exports language %AD_LANGUAGE% into directory %DIRECTORY%
@pause
@"%JAVA_HOME%\bin\java" -cp %CLASSPATH% org.compiere.install.Translation %DIRECTORY% %AD_LANGUAGE% export
@pause

View File

@ -1,22 +0,0 @@
#!/bin/sh
# $Id: RUN_TrlExport.sh,v 1.4 2005/01/22 21:59:15 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Export Adempiere Translation - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
# need to change this to reflect your language
export AD_LANGUAGE=ca_ES
export DIRECTORY=$ADEMPIERE_HOME/data/$AD_LANGUAGE
echo This Procedure exports language $AD_LANGUAGE to directory $DIRECTORY
$JAVA_HOME/bin/java -cp $CLASSPATH org.compiere.install.Translation $DIRECTORY $AD_LANGUAGE export
echo Done

View File

@ -1,14 +0,0 @@
@Rem $Id: RUN_TrlImport.bat,v 1.4 2005/09/16 00:49:37 jjanke Exp $
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Import Translation - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@SET AD_LANGUAGE=de_DE
@SET DIRECTORY=%ADEMPIERE_HOME%\data\%AD_LANGUAGE%
@echo This Procedure imports language %AD_LANGUAGE% from directory %DIRECTORY%
@pause
@"%JAVA_HOME%\bin\java" -cp %CLASSPATH% org.compiere.install.Translation %DIRECTORY% %AD_LANGUAGE% import
@pause

View File

@ -1,22 +0,0 @@
#!/bin/sh
# $Id: RUN_TrlImport.sh,v 1.3 2005/01/22 21:59:15 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Import Adempiere Translation - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
# need to change this to reflect your language
export AD_LANGUAGE=ca_ES
export DIRECTORY=$ADEMPIERE_HOME/data/$AD_LANGUAGE
echo This Procedure imports language $AD_LANGUAGE from directory $DIRECTORY
$JAVA_HOME/bin/java -cp $CLASSPATH org.compiere.install.Translation $DIRECTORY $AD_LANGUAGE import
echo Done

View File

@ -1,22 +0,0 @@
#!/bin/sh
#
echo Set Unix Environment
# $Id: RUN_UnixEnvTemplate.sh,v 1.3 2004/03/11 05:41:13 jjanke Exp $
echo ===================================
echo Setup Client Environment
echo ===================================
JAVA_HOME=@JAVA_HOME@
export JAVA_HOME
ADEMPIERE_HOME=@ADEMPIERE_HOME@
export ADEMPIERE_HOME
echo "\$JAVA_HOME is set to $JAVA_HOME and \$ADEMPIERE_HOME is set to $ADEMPIERE_HOME"
# ORACLE_HOME=/var/oracle/OraHome92
# export ORACLE_HOME
# Please check Oracle Installation documentation for details
# LD_LIBRARY_PATH=$ORACLE_HOME/lib
# export LD_LIBRARY_PATH

View File

@ -1,9 +0,0 @@
@Title Set Windows Environment
@Rem $Id: RUN_WinEnvTemplate.bat,v 1.4 2005/09/08 21:56:00 jjanke Exp $
@Echo ===================================
@Echo Setup Client Environment
@Echo ===================================
@cscript //nologo @ADEMPIERE_HOME@\utils\WinEnv.js "@ADEMPIERE_HOME@" "@JAVA_HOME@"

View File

@ -1,69 +0,0 @@
// Usage: WinEnv ADEMPIERE_HOME JAVA_HOME
// Example: WinEnv C:\Adempiere C:\Program Files\Java\jdk1.5.0_05
// Example: cscript WinEnv.js C:\Adempiere C:\Program Files\Java\jdk1.5.0_05
//
// WinEnv.js - Set up Windows Environment
// $Id: WinEnv.js,v 1.1 2006/04/21 18:06:56 jjanke Exp $
// Get Objects
var Shell = new ActiveXObject("WScript.Shell");
var DesktopPath = Shell.SpecialFolders("Desktop");
var Args = WScript.Arguments;
var SysEnv = Shell.Environment("SYSTEM");
if (Args.length != 2)
{
WScript.Echo("Usage: cscript WinEnv.js ADEMPIERE_HOME JAVA_HOME"
+ "\nExample:\ncscript WinEnv.js C:\\Adempiere \"C:\\Program Files\\Java\\jdk1.5.0_05\"");
WScript.Quit (1);
}
// Set Environment Variables
var home = Args(0).replace("\"","");
SysEnv("ADEMPIERE_HOME") = home;
WScript.Echo ("SET ADEMPIERE_HOME="+ home);
home = Args(1).replace("\"","");
SysEnv("JAVA_HOME") = home;
WScript.Echo ("SET JAVA_HOME="+ home);
// Check that JAVA_HOME is in PATH
var pathString = SysEnv("PATH"); // Shell.ExpandEnvironmentStrings("%PATH%");
var index = pathString.indexOf(home);
if (index == -1)
{
SysEnv("PATH") = home + "\\bin;" + pathString;
var index_2 = SysEnv("PATH").indexOf(home);
if (index_2 == -1)
WScript.Echo ("Path NOT changed - run program as Administrator!");
else
WScript.Echo ("Path Changed = " + SysEnv("PATH"));
}
else
WScript.Echo ("Path is OK = " + SysEnv("PATH"));
// Create Adempiere.exe Shortcut
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsMthCreateShortcut.asp
var link = Shell.CreateShortcut(DesktopPath + "\\Adempiere.lnk");
link.TargetPath = Args(0) + "\\lib\\Adempiere.exe";
link.Arguments = "-debug";
link.Description = "Adempiere Client";
link.IconLocation = Args(0) + "\\lib\\Adempiere.exe,0";
link.WorkingDirectory = Args(0);
link.WindowStyle = 3;
link.HotKey = "CTRL+ALT+SHIFT+C";
link.Save();
WScript.Echo ("Created Shortcut Adempiere.lnk");
// Create Web Site Shortcut
var urlLink = Shell.CreateShortcut(DesktopPath + "\\Adempiere Web Site.url");
urlLink.TargetPath = "http://www.adempiere.org";
urlLink.Save();
WScript.Echo ("Created Shortcut Adempiere Web Site.url");
WScript.Echo ("Done");

View File

@ -1,30 +0,0 @@
<?xml version = "1.0" encoding = "UTF-8"?>
<jnlp spec = "1.6+" version = "3.6.0LTS"
codebase = "http://@ADEMPIERE_APPS_SERVER@:@ADEMPIERE_WEB_PORT@/admin/adempiereHome"
href = "http://@ADEMPIERE_APPS_SERVER@:@ADEMPIERE_WEB_PORT@/admin/adempiereHome/adempiereDirect.jnlp">
<information>
<title>Adempiere Client 3.6.0LTS @ADEMPIERE_APPS_SERVER@ Direct</title>
<vendor>ADempiere, Inc.</vendor>
<homepage href = "http://www.adempiere.org"/>
<description>Adempiere ERP+CRM (local) - Smart Business Solution for Distribution and Service - globally</description>
<description kind = "short">Adempiere ERP+CRM (local)</description>
<description kind = "one-line">Adempiere ERP+CRM</description>
<description kind = "tooltip">Adempiere ERP+CRM (Local Release)</description>
<icon href = "http://@ADEMPIERE_APPS_SERVER@:@ADEMPIERE_WEB_PORT@/admin/C32.gif"/>
<shortcut online="true">
<desktop/>
<menu submenu="Adempiere 3.6.0LTS @ADEMPIERE_APPS_SERVER@ Direct"/>
</shortcut>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version = "1.6+" href = "http://java.sun.com/products/autodl/j2se" initial-heap-size = "32m" max-heap-size = "512m"/>
<jar href = "Adempiere.jar" main = "true" download = "eager"/>
<jar href = "AdempiereCLib.jar" main = "false" download = "eager"/>
<jar href = "CompiereJasperReqs.jar" main = "false" download = "eager"/>
<property name="adempiereJNLP" value="@ADEMPIERE_APPS_SERVER@:@ADEMPIERE_WEB_PORT@"/>
</resources>
<application-desc main-class = "org.compiere.Adempiere"/>
</jnlp>

View File

@ -1,7 +0,0 @@
open @ADEMPIERE_FTP_SERVER@
@ADEMPIERE_FTP_USER@
@ADEMPIERE_FTP_PASSWORD@
bin
ls Adempiere.jar
get Adempiere.jar
quit

View File

@ -1,7 +0,0 @@
open @ADEMPIERE_FTP_SERVER@
@ADEMPIERE_FTP_USER@
@ADEMPIERE_FTP_PASSWORD@
bin
put ExpDat.jar @ADEMPIERE_FTP_PREFIX@_ExpDat.jar
ls @ADEMPIERE_FTP_PREFIX@_ExpDat.jar
quit

View File

@ -1,23 +0,0 @@
@Title Copy Database after backup
@Rem $Id: myDBcopyTemplate.bat,v 1.4 2003/12/04 04:38:27 jjanke Exp $
@Echo Modify the script myDBcopy to copy the database backup
@Rem This example creates one unique file per day in a month
@Rem You may want to copy it to another disk first
@Rem Note that the %DATE% parameter is local specific.
@Rem In Germany, it is %DATE:~3,2%
@Rem When called, the following files were created:
@Rem %ADEMPIERE_HOME%\data\ExpDat.dmp
@Rem %ADEMPIERE_HOME%\data\ExpDat.log
@Rem %ADEMPIERE_HOME%\data\ExpDat.jar (containing the above)
@set DATETIME=%date:~6,4%%date:~3,2%%date:~0,2%_%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%
@Echo Creating ExpDat_%DATETIME%.jar
ren ExpDat.jar "ExpDat%DATETIME%.jar"
@dir ExpDat%DATETIME%.jar
@Echo copy %ADEMPIERE_HOME%\data\ExpDat%DATETIME%.jar to backup media
@Rem Sleep 30
@CHOICE /C YN /T 30 /D N > NUL

View File

@ -1,10 +0,0 @@
#!/bin/sh
# Copy Database after backup
# $Id: myDBcopyTemplate.sh,v 1.1 2002/10/07 01:23:32 jjanke Exp $
DATE=`date +%Y%m%d_%H%M%S`
mv $ADEMPIERE_HOME/data/ExpDat.jar $ADEMPIERE_HOME/data/ExpDat$DATE.jar
echo copy $ADEMPIERE_HOME/data/ExpDat$DATE.jar to backup media
sleep 30

View File

@ -1,58 +0,0 @@
@Rem myEnvironment defines the variables used for Adempiere
@Rem Do not edit directly - use RUN_setup
@Rem
@Rem $Id: myEnvironmentTemplate.bat,v 1.12 2005/01/22 21:59:15 jjanke Exp $
@Echo Setting myEnvironment ....
@Rem Clients only needs
@Rem ADEMPIERE_HOME
@Rem JAVA_HOME
@Rem Server install needs to check
@Rem ADEMPIERE_DB_NAME (for Oracle)
@Rem passwords
@Rem Homes ...
@SET ADEMPIERE_HOME=@ADEMPIERE_HOME@
@SET JAVA_HOME=@JAVA_HOME@
@Rem Database ...
@SET ADEMPIERE_DB_SERVER=@ADEMPIERE_DB_SERVER@
@SET ADEMPIERE_DB_USER=@ADEMPIERE_DB_USER@
@SET ADEMPIERE_DB_PASSWORD=@ADEMPIERE_DB_PASSWORD@
@SET ADEMPIERE_DB_URL=@ADEMPIERE_DB_URL@
@SET ADEMPIERE_DB_PORT=@ADEMPIERE_DB_PORT@
@Rem Oracle specifics
@SET ADEMPIERE_DB_PATH=@ADEMPIERE_DB_PATH@
@SET ADEMPIERE_DB_NAME=@ADEMPIERE_DB_NAME@
@SET ADEMPIERE_DB_SYSTEM=@ADEMPIERE_DB_SYSTEM@
@Rem Homes(2)
@SET ADEMPIERE_DB_HOME=@ADEMPIERE_HOME@\utils\@ADEMPIERE_DB_TYPE@
@SET JBOSS_HOME=@ADEMPIERE_HOME@\jboss
@Rem Apps Server
@SET ADEMPIERE_APPS_TYPE=@ADEMPIERE_APPS_TYPE@
@SET ADEMPIERE_APPS_SERVER=@ADEMPIERE_APPS_SERVER@
@SET ADEMPIERE_JNP_PORT=@ADEMPIERE_JNP_PORT@
@SET ADEMPIERE_WEB_PORT=@ADEMPIERE_WEB_PORT@
@SET ADEMPIERE_APPS_DEPLOY=@ADEMPIERE_APPS_TYPE@
@Rem SSL Settings
@SET ADEMPIERE_SSL_PORT=@ADEMPIERE_SSL_PORT@
@SET ADEMPIERE_KEYSTORE=@ADEMPIERE_KEYSTORE@
@SET ADEMPIERE_KEYSTOREWEBALIAS=@ADEMPIERE_KEYSTOREWEBALIAS@
@SET ADEMPIERE_KEYSTOREPASS=@ADEMPIERE_KEYSTOREPASS@
@Rem etc.
@SET ADEMPIERE_FTP_SERVER=@ADEMPIERE_FTP_SERVER@
@SET ADEMPIERE_FTP_USER=@ADEMPIERE_FTP_USER@
@Rem Java
@SET ADEMPIERE_JAVA=@JAVA_HOME@\bin\java
@SET ADEMPIERE_JAVA_OPTIONS=@ADEMPIERE_JAVA_OPTIONS@ -DADEMPIERE_HOME=@ADEMPIERE_HOME@
@SET CLASSPATH="@ADEMPIERE_HOME@\lib\Adempiere.jar;@ADEMPIERE_HOME@\lib\AdempiereCLib.jar;"
@Rem Save Environment file
@if (%1) == () copy myEnvironment.bat myEnvironment_%RANDOM%.bat /Y

View File

@ -1,81 +0,0 @@
#!/bin/sh
#
# myEnvironment defines the variables used for Adempiere
# Do not edit directly - use RUN_setup
#
# $Id: myEnvironmentTemplate.sh,v 1.12 2005/02/21 03:17:21 jjanke Exp $
echo Setting myEnvironment ....
# Clients only needs
# ADEMPIERE_HOME
# JAVA_HOME
# Server install needs to change
# ADEMPIERE_DB_NAME (for Oracle)
# passwords
#
# For a HTML browser, Adempiere will call "netscape <targetURL>"
# If not in the path, provide a link called netscape to your browser
# Homes ...
ADEMPIERE_HOME=@ADEMPIERE_HOME@
export ADEMPIERE_HOME
JAVA_HOME=@JAVA_HOME@
export JAVA_HOME
# Database ...
ADEMPIERE_DB_SERVER=@ADEMPIERE_DB_SERVER@
export ADEMPIERE_DB_SERVER
ADEMPIERE_DB_USER=@ADEMPIERE_DB_USER@
export ADEMPIERE_DB_USER
ADEMPIERE_DB_PASSWORD=@ADEMPIERE_DB_PASSWORD@
export ADEMPIERE_DB_PASSWORD
ADEMPIERE_DB_URL=@ADEMPIERE_DB_URL@
export ADEMPIERE_DB_URL
ADEMPIERE_DB_PORT=@ADEMPIERE_DB_PORT@
export ADEMPIERE_DB_PORT
# Oracle Specifics ...
ADEMPIERE_DB_PATH=@ADEMPIERE_DB_PATH@
export ADEMPIERE_DB_PATH
ADEMPIERE_DB_NAME=@ADEMPIERE_DB_NAME@
export ADEMPIERE_DB_NAME
ADEMPIERE_DB_SYSTEM=@ADEMPIERE_DB_SYSTEM@
export ADEMPIERE_DB_SYSTEM
# Homes(2)
ADEMPIERE_DB_HOME=$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH
export ADEMPIERE_DB_HOME
JBOSS_HOME=$ADEMPIERE_HOME/jboss
export JBOSS_HOME
# Apps Server
ADEMPIERE_APPS_SERVER=@ADEMPIERE_APPS_SERVER@
export ADEMPIERE_APPS_SERVER
ADEMPIERE_WEB_PORT=@ADEMPIERE_WEB_PORT@
export ADEMPIERE_WEB_PORT
ADEMPIERE_JNP_PORT=@ADEMPIERE_JNP_PORT@
export ADEMPIERE_JNP_PORT
# SSL Settings - see jboss/server/adempiere/deploy/jbossweb.sar/META-INF/jboss-service.xml
ADEMPIERE_SSL_PORT=@ADEMPIERE_SSL_PORT@
export ADEMPIERE_SSL_PORT
ADEMPIERE_KEYSTORE=@ADEMPIERE_KEYSTORE@
export ADEMPIERE_KEYSTORE
ADEMPIERE_KEYSTOREPASS=@ADEMPIERE_KEYSTOREPASS@
export ADEMPIERE_KEYSTOREPASS
# etc.
ADEMPIERE_FTP_SERVER=@ADEMPIERE_FTP_SERVER@
export ADEMPIERE_FTP_SERVER
# Java
ADEMPIERE_JAVA=$JAVA_HOME/bin/java
export ADEMPIERE_JAVA
ADEMPIERE_JAVA_OPTIONS="@ADEMPIERE_JAVA_OPTIONS@ -DADEMPIERE_HOME=$ADEMPIERE_HOME"
export ADEMPIERE_JAVA_OPTIONS
CLASSPATH="$ADEMPIERE_HOME/lib/Adempiere.jar:$ADEMPIERE_HOME/lib/AdempiereCLib.jar"
export CLASSPATH
if [ $DOLLAR$# -eq 0 ]
then
cp myEnvironment.sh myEnvironment.sav
fi

View File

@ -1,67 +0,0 @@
DECLARE
ins VARCHAR2 (2000);
sel VARCHAR2 (2000);
inssel VARCHAR2 (4001);
table_id NUMBER;
BEGIN
ins := RPAD (' ', 2000, ' ');
sel := RPAD (' ', 2000, ' ');
inssel := RPAD (' ', 4001, ' ');
DBMS_OUTPUT.PUT_LINE ('Start');
FOR t IN (SELECT ad_table_id,
SUBSTR (tablename, 1, LENGTH (tablename) - 4) tablename
FROM AD_TABLE
WHERE tablename LIKE '%_Trl' AND isactive = 'Y'
AND isview = 'N')
LOOP
ins :=
'INSERT INTO '
|| t.tablename
|| '_TRL ('
|| 'ad_language,ad_client_id,ad_org_id,created,createdby,updated,updatedby,isactive,istranslated,'
|| t.tablename
|| '_id';
sel :=
'SELECT l.ad_language,t.ad_client_id,t.ad_org_id,t.created,t.createdby,t.updated,t.updatedby,t.isactive,''N'' as istranslated,'
|| t.tablename
|| '_id';
SELECT ad_table_id
INTO table_id
FROM AD_TABLE
WHERE tablename = t.tablename;
FOR c IN (SELECT col.columnname
FROM AD_COLUMN col INNER JOIN AD_TABLE tab
ON (col.ad_table_id = tab.ad_table_id)
WHERE col.ad_table_id = table_id
AND col.istranslated = 'Y'
AND col.isactive = 'Y'
ORDER BY 1)
LOOP
ins := TRIM (ins) || ',' || TRIM (c.columnname);
sel := TRIM (sel) || ',t.' || TRIM (c.columnname);
END LOOP;
ins := TRIM (ins) || ')';
sel :=
TRIM (sel)
|| ' from '
|| t.tablename
|| ' t, ad_language l WHERE l.issystemlanguage=''Y'' AND NOT EXISTS (SELECT 1 FROM '
|| t.tablename
|| '_TRL b WHERE b.'
|| t.tablename
|| '_id=t.'
|| t.tablename
|| '_id AND b.AD_LANGUAGE=l.AD_LANGUAGE)';
inssel := TRIM (ins) || ' ' || TRIM (sel);
DBMS_OUTPUT.PUT_LINE (inssel);
EXECUTE IMMEDIATE inssel;
END LOOP;
DBMS_OUTPUT.PUT_LINE ('End');
COMMIT;
END;

View File

@ -1,35 +0,0 @@
@Echo Adempiere Database Export $Revision: 1.8 $
@Rem $Id: DBExport.bat,v 1.8 2005/04/27 17:45:01 jjanke Exp $
@Rem
@Echo Saving database %1@%ADEMPIERE_DB_NAME% to %ADEMPIERE_HOME%\data\ExpDat.dmp
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameter: userAccount
@if (%1) == () goto usage
@Rem Cleanup
@sqlplus %1/%2@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
@Rem The Export
@exp %1/%2@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDat.dmp Log=%ADEMPIERE_HOME%\data\ExpDat.log CONSISTENT=Y STATISTICS=NONE OWNER=%1
@cd %ADEMPIERE_HOME%\Data
@copy ExpDat.jar ExpDatOld.jar
@jar cvfM ExpDat.jar ExpDat.dmp ExpDat.log
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\Adempiere
@Echo ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org
:usage
@echo Usage: %0 <userAccount>
@echo Examples: %0 adempiere adempiere
:end

View File

@ -1,30 +0,0 @@
#!/bin/sh
echo Adempiere Database Export $Revision: 1.5 $
# $Id: DBExport.sh,v 1.5 2005/12/20 07:12:17 jjanke Exp $
echo Saving database $1@$ADEMPIERE_DB_NAME to $ADEMPIERE_HOME/data/ExpDat.dmp
if [ $# -eq 0 ]
then
echo "Usage: $0 <userAccount>"
echo "Example: $0 adempiere adempiere"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
# Cleanup
sqlplus $1/$2@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Daily.sql
# Export
exp $1/$2@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDat.dmp Log=$ADEMPIERE_HOME/data/ExpDat.log CONSISTENT=Y OWNER=$1
cd $ADEMPIERE_HOME/data
jar cvfM ExpDat.jar ExpDat.dmp ExpDat.log

View File

@ -1,34 +0,0 @@
@Echo Adempiere Full Database Export $Revision: 1.6 $
@Rem $Id: DBExportFull.bat,v 1.6 2005/04/27 17:45:01 jjanke Exp $
@Echo Saving database %1@%ADEMPIERE_DB_NAME% to %ADEMPIERE_HOME%\data\ExpDatFull.dmp
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameter: systemAccount
@if (%1) == () goto usage
@sqlplus %1/%2@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
@exp %1/%2@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDatFull.dmp Log=%ADEMPIERE_HOME%\data\ExpDatFull.log CONSISTENT=Y STATISTICS=NONE FULL=Y
@cd %ADEMPIERE_HOME%\data
@jar cvfM data\ExpDatFull.jar ExpDatFull.dmp ExpDatFull.log
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\Adempiere
@Echo ADEMPIERE_DB_NAME e.g. dev1.adempiere.org
:usage
@echo Usage: %0 <systemAccount>
@echo Examples: %0 system/manager
:end

View File

@ -1,27 +0,0 @@
#!/bin/sh
echo Adempiere Full Database Export $Revision: 1.3 $
# $Id: DBExportFull.sh,v 1.3 2005/01/22 21:59:15 jjanke Exp $
echo Saving database $1@$ADEMPIERE_DB_NAME to $ADEMPIERE_HOME/data/ExpDatFull.dmp
if [ $# -eq 0 ]
then
echo "Usage: $0 <systemAccount>"
echo "Example: $0 system/manager"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
exp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDatFull.dmp Log=$ADEMPIERE_HOME/data/ExpDatFull.log CONSISTENT=Y FULL=Y
cd $ADEMPIERE_HOME/data
jar cvfM ExpDatFull.jar ExpDatFull.dmp ExpDatFull.log

View File

@ -1,48 +0,0 @@
@Echo Adempiere Database Restore $Revision: 1.6 $
@Rem $Id: DBRestore.bat,v 1.6 2005/08/27 02:27:10 jjanke Exp $
@Echo Restoring Adempiere DB from %ADEMPIERE_HOME%\data\ExpDat.dmp
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameter: systemAccount adempiereID AdempierePwd
@if (%1) == () goto usage
@if (%2) == () goto usage
@if (%3) == () goto usage
@echo -------------------------------------
@echo Re-Create DB user
@echo -------------------------------------
@sqlplus %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\CreateUser.sql %2 %3
@echo -------------------------------------
@echo Import ExpDat
@echo -------------------------------------
@imp %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDat.dmp FROMUSER=(%2) TOUSER=%2 STATISTICS=RECALCULATE
@echo -------------------------------------
@echo Create SQLJ
@echo -------------------------------------
@call %ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\create %ADEMPIERE_DB_USER%/%ADEMPIERE_DB_PASSWORD%
@echo -------------------------------------
@echo Check System
@echo Import may show some warnings. This is OK as long as the following does not show errors
@echo -------------------------------------
@sqlplus %2/%3@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\AfterImport.sql
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\Adempiere
@Echo ADEMPIERE_DB_NAME e.g. dev1.adempiere.org
:usage
@echo Usage: %0% <systemAccount> <AdempiereID> <AdempierePwd>
@echo Example: %0% system/manager adempiere adempiere
:end

View File

@ -1,42 +0,0 @@
#!/bin/sh
# $Id: DBRestore.sh,v 1.8 2005/12/20 07:12:17 jjanke Exp $
echo Adempiere Database Restore $Revision: 1.8 $
echo Restoring Adempiere DB from $ADEMPIERE_HOME/data/ExpDat.dmp
if [ $# -le 2 ]
then
echo "Usage: $0 <systemAccount> <AdempiereID> <AdempierePWD>"
echo "Example: $0 system/manager adempiere adempiere"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
echo -------------------------------------
echo Re-Create DB user
echo -------------------------------------
sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
echo -------------------------------------
echo Import ExpDat
echo -------------------------------------
imp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDat.dmp FROMUSER=\($2\) TOUSER=$2
echo -------------------------------------
echo Create SQLJ
echo -------------------------------------
$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/create.sh $ADEMPIERE_DB_USER/$ADEMPIERE_DB_PASSWORD
echo -------------------------------------
echo Check System
echo Import may show some warnings. This is OK as long as the following does not show errors
echo -------------------------------------
sqlplus $2/$3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql

View File

@ -1,21 +0,0 @@
#!/bin/sh
echo Adempiere Database Export $Revision: 1.5 $
# $Id: DBExport.sh,v 1.5 2005/12/20 07:12:17 jjanke Exp $
echo Saving reference database reference@$ADEMPIERE_DB_NAME to $ADEMPIERE_HOME/data/Adempiere.dmp
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
# Export
exp reference/reference@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp Log=$ADEMPIERE_HOME/data/Adempiere.log CONSISTENT=Y OWNER=reference
cd $ADEMPIERE_HOME/data
jar cvfM Adempiere.jar Adempiere.dmp Adempiere.log

View File

@ -1,48 +0,0 @@
@Echo Adempiere Database Import $Revision: 1.9 $
@Rem $Id: ImportAdempiere.bat,v 1.9 2005/09/24 01:50:41 jjanke Exp $
@Echo Importing Adempiere DB from %ADEMPIERE_HOME%\data\Adempiere.dmp (%ADEMPIERE_DB_NAME%)
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameters systemAccount AdempiereID AdempierePwd
@if (%1) == () goto usage
@if (%2) == () goto usage
@if (%3) == () goto usage
@echo -------------------------------------
@echo Re-Create DB user
@echo -------------------------------------
@sqlplus %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\CreateUser.sql %2 %3
@echo -------------------------------------
@echo Import Adempiere.dmp
@echo -------------------------------------
@imp %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Adempiere.dmp FROMUSER=(reference) TOUSER=%2 STATISTICS=RECALCULATE
echo -------------------------------------
echo Create SQLJ
echo -------------------------------------
call %ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\create %ADEMPIERE_DB_USER%/%ADEMPIERE_DB_PASSWORD%
@echo --------========--------========--------========--------
@echo System Check - The Import phase showed warnings.
@echo This is OK as long as the following does not show errors
@echo --------========--------========--------========--------
@sqlplus %2/%3@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\AfterImport.sql
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\Adempiere
@Echo ADEMPIERE_DB_NAME e.g. dev1.adempiere.org
:usage
@echo Usage: %0 <systemAccount> <AdempiereID> <AdempierePwd>
@echo Example: %0 system/manager Adempiere Adempiere
:end

View File

@ -1,45 +0,0 @@
#!/bin/sh
# $Id: ImportAdempiere.sh,v 1.10 2005/12/20 07:12:17 jjanke Exp $
echo Adempiere Database Import $Revision: 1.10 $
echo Importing Adempiere DB from $ADEMPIERE_HOME/data/Adempiere.dmp
if [ $# -le 2 ]
then
echo "Usage: $0 <systemAccount> <AdempiereID> <AdempierePWD>"
echo "Example: $0 system/manager adempiere adempiere"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
echo -------------------------------------
echo Re-Create DB user
echo -------------------------------------
echo sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
echo -------------------------------------
echo Import Adempiere.dmp
echo -------------------------------------
echo "imp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp FROMUSER=\(reference\) TOUSER=$2"
imp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp FROMUSER=\(reference\) TOUSER=$2
echo -------------------------------------
echo Create SQLJ
echo -------------------------------------
$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/create.sh $ADEMPIERE_DB_USER/$ADEMPIERE_DB_PASSWORD
echo -------------------------------------
echo Check System
echo Import may show some warnings. This is OK as long as the following does not show errors
echo -------------------------------------
echo sqlplus $2/$3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql
sqlplus $2/$3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql

View File

@ -1,41 +0,0 @@
@Echo Adempiere Reference Database Import $Revision: 1.4 $
@Rem $Id: ImportReference.bat,v 1.4 2005/01/22 21:59:15 jjanke Exp $
@Echo Importing Reference DB from %ADEMPIERE_HOME%\data\Reference.dmp
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameter: systemAccount
@if (%1) == () goto usage
@echo -------------------------------------
@echo Re-Create new user
@echo -------------------------------------
@sqlplus %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\CreateUser.sql Reference Adempiere
@echo -------------------------------------
@echo Import Reference
@echo -------------------------------------
imp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Reference.dmp FROMUSER=(reference) TOUSER=reference
@echo -------------------------------------
@echo Check System
@echo Import may show some warnings. This is OK as long as the following does not show errors
@echo -------------------------------------
@sqlplus reference/adempiere@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\AfterImport.sql
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\Adempiere
@Echo ADEMPIERE_DB_NAME e.g. dev1.adempiere.org
:usage
@echo Usage: %0 <systemAccount>
@echo Examples: %0 system/manager
:end

View File

@ -1,39 +0,0 @@
#!/bin/sh
# $Id: ImportReference.sh,v 1.5 2005/01/22 21:59:15 jjanke Exp $
echo Adempiere Reference Database Import $Revision: 1.5 $
echo Importing Reference DB from $ADEMPIERE_HOME/data/Reference.dmp
if [ $# -eq 2 ]
then
echo "Usage: $0 <systemAccount>"
echo "Example: $0 system/manager"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
echo -------------------------------------
echo Re-Create new user
echo -------------------------------------
sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql Reference Adempiere
echo -------------------------------------
echo Import Reference
echo -------------------------------------
echo imp $1@$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Reference.dmp FROMUSER=\(reference\) TOUSER=reference
imp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Reference.dmp FROMUSER=\(reference\) TOUSER=reference
echo -------------------------------------
echo Check System
echo Import may show some warnings. This is OK as long as the following does not show errors
echo -------------------------------------
sqlplus reference/adempiere@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql

View File

@ -1,23 +0,0 @@
#!/bin/sh
# $Id: PostMigration.sh
echo Oracle Post Migration Scripts
if [ $# -le 2 ]
then
echo "Usage: $0 <systemAccount> <AdempiereID> <AdempierePWD>"
echo "Example: $0 system/manager adempiere adempiere"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
echo -------------------------------------
echo Add missing translations
echo -------------------------------------
echo sqlplus $2/$3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/01_add_missing_Translations.sql

View File

@ -1,13 +0,0 @@
@Rem $Id: Start.bat,v 1.7 2005/01/22 21:59:15 jjanke Exp $
@Echo Starting Listener ....
lsnrctl start
@Echo Starting Database ....
@sqlplus "system/%ADEMPIERE_DB_SYSTEM%@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% AS SYSDBA" @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Start.sql
@Echo Starting optional agent ....
agentctl start
@Echo ------------------------
lsnrctl status

View File

@ -1,5 +0,0 @@
#!/bin/sh
# $Id: Start.sh,v 1.6 2005/01/22 21:59:15 jjanke Exp $
sqlplus "system/$ADEMPIERE_DB_SYSTEM@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME AS SYSDBA" @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Start.sql

View File

@ -1,11 +0,0 @@
@Rem $Id: Stop.bat,v 1.7 2005/01/22 21:59:15 jjanke Exp $
@Echo Stopping database ....
@sqlplus "system/%ADEMPIERE_DB_SYSTEM%@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% AS SYSDBA" @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Stop.sql
@Echo Stopping Listener ....
lsnrctl stop
@Echo Stopping (optional) Agent ....
agentctl stop

View File

@ -1,10 +0,0 @@
#!/bin/sh
# $Id: Stop.sh,v 1.7 2005/01/22 21:59:15 jjanke Exp $
# In a multi-instance environment set the environment first
# SET ORACLE_SID=
# export ORACLE_SID
sqlplus "system/$ADEMPIERE_DB_SYSTEM@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME AS SYSDBA" @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Stop.sql

View File

@ -1,67 +0,0 @@
DECLARE
ins VARCHAR2 (2000);
sel VARCHAR2 (2000);
inssel VARCHAR2 (4001);
table_id NUMBER;
BEGIN
ins := RPAD (' ', 2000, ' ');
sel := RPAD (' ', 2000, ' ');
inssel := RPAD (' ', 4001, ' ');
DBMS_OUTPUT.PUT_LINE ('Start');
FOR t IN (SELECT ad_table_id,
SUBSTR (tablename, 1, LENGTH (tablename) - 4) tablename
FROM AD_TABLE
WHERE tablename LIKE '%_Trl' AND isactive = 'Y'
AND isview = 'N')
LOOP
ins :=
'INSERT INTO '
|| t.tablename
|| '_TRL ('
|| 'ad_language,ad_client_id,ad_org_id,created,createdby,updated,updatedby,isactive,istranslated,'
|| t.tablename
|| '_id';
sel :=
'SELECT l.ad_language,t.ad_client_id,t.ad_org_id,t.created,t.createdby,t.updated,t.updatedby,t.isactive,''N'' as istranslated,'
|| t.tablename
|| '_id';
SELECT ad_table_id
INTO table_id
FROM AD_TABLE
WHERE tablename = t.tablename;
FOR c IN (SELECT col.columnname
FROM AD_COLUMN col INNER JOIN AD_TABLE tab
ON (col.ad_table_id = tab.ad_table_id)
WHERE col.ad_table_id = table_id
AND col.istranslated = 'Y'
AND col.isactive = 'Y'
ORDER BY 1)
LOOP
ins := TRIM (ins) || ',' || TRIM (c.columnname);
sel := TRIM (sel) || ',t.' || TRIM (c.columnname);
END LOOP;
ins := TRIM (ins) || ')';
sel :=
TRIM (sel)
|| ' from '
|| t.tablename
|| ' t, ad_language l WHERE l.issystemlanguage=''Y'' AND NOT EXISTS (SELECT 1 FROM '
|| t.tablename
|| '_TRL b WHERE b.'
|| t.tablename
|| '_id=t.'
|| t.tablename
|| '_id AND b.AD_LANGUAGE=l.AD_LANGUAGE)';
inssel := TRIM (ins) || ' ' || TRIM (sel);
DBMS_OUTPUT.PUT_LINE (inssel);
EXECUTE IMMEDIATE inssel;
END LOOP;
DBMS_OUTPUT.PUT_LINE ('End');
COMMIT;
END;

View File

@ -1,35 +0,0 @@
@Echo Adempiere Database Export $Revision: 1.8 $
@Rem $Id: DBExport.bat,v 1.8 2005/04/27 17:45:01 jjanke Exp $
@Rem
@Echo Saving database %1@%ADEMPIERE_DB_NAME% to %ADEMPIERE_HOME%\data\ExpDat.dmp
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameter: userAccount
@if (%1) == () goto usage
@Rem Cleanup
@sqlplus %1/%2@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
@Rem The Export
@exp %1/%2@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDat.dmp Log=%ADEMPIERE_HOME%\data\ExpDat.log CONSISTENT=Y STATISTICS=NONE OWNER=%1
@cd %ADEMPIERE_HOME%\Data
@copy ExpDat.jar ExpDatOld.jar
@jar cvfM ExpDat.jar ExpDat.dmp ExpDat.log
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\Adempiere
@Echo ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org
:usage
@echo Usage: %0 <userAccount>
@echo Examples: %0 adempiere adempiere
:end

View File

@ -1,30 +0,0 @@
#!/bin/sh
echo Adempiere Database Export $Revision: 1.5 $
# $Id: DBExport.sh,v 1.5 2005/12/20 07:12:17 jjanke Exp $
echo Saving database $1@$ADEMPIERE_DB_NAME to $ADEMPIERE_HOME/data/ExpDat.dmp
if [ $# -eq 0 ]
then
echo "Usage: $0 <userAccount>"
echo "Example: $0 adempiere adempiere"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
# Cleanup
sqlplus $1/$2@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Daily.sql
# Export
exp $1/$2@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDat.dmp Log=$ADEMPIERE_HOME/data/ExpDat.log CONSISTENT=Y OWNER=$1
cd $ADEMPIERE_HOME/data
jar cvfM ExpDat.jar ExpDat.dmp ExpDat.log

View File

@ -1,34 +0,0 @@
@Echo Adempiere Full Database Export $Revision: 1.6 $
@Rem $Id: DBExportFull.bat,v 1.6 2005/04/27 17:45:01 jjanke Exp $
@Echo Saving database %1@%ADEMPIERE_DB_NAME% to %ADEMPIERE_HOME%\data\ExpDatFull.dmp
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameter: systemAccount
@if (%1) == () goto usage
@sqlplus %1/%2@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
@exp %1/%2@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDatFull.dmp Log=%ADEMPIERE_HOME%\data\ExpDatFull.log CONSISTENT=Y STATISTICS=NONE FULL=Y
@cd %ADEMPIERE_HOME%\data
@jar cvfM data\ExpDatFull.jar ExpDatFull.dmp ExpDatFull.log
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\Adempiere
@Echo ADEMPIERE_DB_NAME e.g. dev1.adempiere.org
:usage
@echo Usage: %0 <systemAccount>
@echo Examples: %0 system/manager
:end

View File

@ -1,27 +0,0 @@
#!/bin/sh
echo Adempiere Full Database Export $Revision: 1.3 $
# $Id: DBExportFull.sh,v 1.3 2005/01/22 21:59:15 jjanke Exp $
echo Saving database $1@$ADEMPIERE_DB_NAME to $ADEMPIERE_HOME/data/ExpDatFull.dmp
if [ $# -eq 0 ]
then
echo "Usage: $0 <systemAccount>"
echo "Example: $0 system/manager"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
exp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDatFull.dmp Log=$ADEMPIERE_HOME/data/ExpDatFull.log CONSISTENT=Y FULL=Y
cd $ADEMPIERE_HOME/data
jar cvfM ExpDatFull.jar ExpDatFull.dmp ExpDatFull.log

View File

@ -1,48 +0,0 @@
@Echo Adempiere Database Restore $Revision: 1.6 $
@Rem $Id: DBRestore.bat,v 1.6 2005/08/27 02:27:10 jjanke Exp $
@Echo Restoring Adempiere DB from %ADEMPIERE_HOME%\data\ExpDat.dmp
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameter: systemAccount adempiereID AdempierePwd
@if (%1) == () goto usage
@if (%2) == () goto usage
@if (%3) == () goto usage
@echo -------------------------------------
@echo Re-Create DB user
@echo -------------------------------------
@sqlplus %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\CreateUser.sql %2 %3
@echo -------------------------------------
@echo Import ExpDat
@echo -------------------------------------
@imp %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDat.dmp FROMUSER=(%2) TOUSER=%2 STATISTICS=RECALCULATE
REM @echo -------------------------------------
REM @echo Create SQLJ
REM @echo -------------------------------------
REM @call %ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\create %ADEMPIERE_DB_USER%/%ADEMPIERE_DB_PASSWORD%
@echo -------------------------------------
@echo Check System
@echo Import may show some warnings. This is OK as long as the following does not show errors
@echo -------------------------------------
@sqlplus %2/%3@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\AfterImport.sql
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\Adempiere
@Echo ADEMPIERE_DB_NAME e.g. dev1.adempiere.org
:usage
@echo Usage: %0% <systemAccount> <AdempiereID> <AdempierePwd>
@echo Example: %0% system/manager adempiere adempiere
:end

View File

@ -1,42 +0,0 @@
#!/bin/sh
# $Id: DBRestore.sh,v 1.8 2005/12/20 07:12:17 jjanke Exp $
echo Adempiere Database Restore $Revision: 1.8 $
echo Restoring Adempiere DB from $ADEMPIERE_HOME/data/ExpDat.dmp
if [ $# -le 2 ]
then
echo "Usage: $0 <systemAccount> <AdempiereID> <AdempierePWD>"
echo "Example: $0 system/manager adempiere adempiere"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
echo -------------------------------------
echo Re-Create DB user
echo -------------------------------------
sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
echo -------------------------------------
echo Import ExpDat
echo -------------------------------------
imp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDat.dmp FROMUSER=\($2\) TOUSER=$2
# echo -------------------------------------
# echo Create SQLJ
# echo -------------------------------------
# $ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/create.sh $ADEMPIERE_DB_USER/$ADEMPIERE_DB_PASSWORD
echo -------------------------------------
echo Check System
echo Import may show some warnings. This is OK as long as the following does not show errors
echo -------------------------------------
sqlplus $2/$3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql

View File

@ -1,21 +0,0 @@
#!/bin/sh
echo Adempiere Database Export $Revision: 1.5 $
# $Id: DBExport.sh,v 1.5 2005/12/20 07:12:17 jjanke Exp $
echo Saving reference database reference@$ADEMPIERE_DB_NAME to $ADEMPIERE_HOME/data/Adempiere.dmp
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
# Export
exp reference/reference@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp Log=$ADEMPIERE_HOME/data/Adempiere.log CONSISTENT=Y OWNER=reference
cd $ADEMPIERE_HOME/data
jar cvfM Adempiere.jar Adempiere.dmp Adempiere.log

View File

@ -1,48 +0,0 @@
@Echo Adempiere Database Import $Revision: 1.9 $
@Rem $Id: ImportAdempiere.bat,v 1.9 2005/09/24 01:50:41 jjanke Exp $
@Echo Importing Adempiere DB from %ADEMPIERE_HOME%\data\Adempiere.dmp (%ADEMPIERE_DB_NAME%)
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameters systemAccount AdempiereID AdempierePwd
@if (%1) == () goto usage
@if (%2) == () goto usage
@if (%3) == () goto usage
@echo -------------------------------------
@echo Re-Create DB user
@echo -------------------------------------
@sqlplus %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\CreateUser.sql %2 %3
@echo -------------------------------------
@echo Import Adempiere.dmp
@echo -------------------------------------
@imp %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Adempiere.dmp FROMUSER=(reference) TOUSER=%2 STATISTICS=RECALCULATE
REM echo -------------------------------------
REM echo Create SQLJ
REM echo -------------------------------------
REM call %ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\create %ADEMPIERE_DB_USER%/%ADEMPIERE_DB_PASSWORD%
@echo --------========--------========--------========--------
@echo System Check - The Import phase showed warnings.
@echo This is OK as long as the following does not show errors
@echo --------========--------========--------========--------
@sqlplus %2/%3@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\AfterImport.sql
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\Adempiere
@Echo ADEMPIERE_DB_NAME e.g. dev1.adempiere.org
:usage
@echo Usage: %0 <systemAccount> <AdempiereID> <AdempierePwd>
@echo Example: %0 system/manager Adempiere Adempiere
:end

View File

@ -1,45 +0,0 @@
#!/bin/sh
# $Id: ImportAdempiere.sh,v 1.10 2005/12/20 07:12:17 jjanke Exp $
echo Adempiere Database Import $Revision: 1.10 $
echo Importing Adempiere DB from $ADEMPIERE_HOME/data/Adempiere.dmp
if [ $# -le 2 ]
then
echo "Usage: $0 <systemAccount> <AdempiereID> <AdempierePWD>"
echo "Example: $0 system/manager adempiere adempiere"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
echo -------------------------------------
echo Re-Create DB user
echo -------------------------------------
echo sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
echo -------------------------------------
echo Import Adempiere.dmp
echo -------------------------------------
echo "imp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp FROMUSER=\(reference\) TOUSER=$2"
imp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp FROMUSER=\(reference\) TOUSER=$2
# echo -------------------------------------
# echo Create SQLJ
# echo -------------------------------------
# $ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/create.sh $ADEMPIERE_DB_USER/$ADEMPIERE_DB_PASSWORD
echo -------------------------------------
echo Check System
echo Import may show some warnings. This is OK as long as the following does not show errors
echo -------------------------------------
echo sqlplus $2/$3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql
sqlplus $2/$3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql

View File

@ -1,41 +0,0 @@
@Echo Adempiere Reference Database Import $Revision: 1.4 $
@Rem $Id: ImportReference.bat,v 1.4 2005/01/22 21:59:15 jjanke Exp $
@Echo Importing Reference DB from %ADEMPIERE_HOME%\data\Reference.dmp
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameter: systemAccount
@if (%1) == () goto usage
@echo -------------------------------------
@echo Re-Create new user
@echo -------------------------------------
@sqlplus %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\CreateUser.sql Reference Adempiere
@echo -------------------------------------
@echo Import Reference
@echo -------------------------------------
imp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Reference.dmp FROMUSER=(reference) TOUSER=reference
@echo -------------------------------------
@echo Check System
@echo Import may show some warnings. This is OK as long as the following does not show errors
@echo -------------------------------------
@sqlplus reference/adempiere@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\AfterImport.sql
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\Adempiere
@Echo ADEMPIERE_DB_NAME e.g. dev1.adempiere.org
:usage
@echo Usage: %0 <systemAccount>
@echo Examples: %0 system/manager
:end

View File

@ -1,39 +0,0 @@
#!/bin/sh
# $Id: ImportReference.sh,v 1.5 2005/01/22 21:59:15 jjanke Exp $
echo Adempiere Reference Database Import $Revision: 1.5 $
echo Importing Reference DB from $ADEMPIERE_HOME/data/Reference.dmp
if [ $# -eq 2 ]
then
echo "Usage: $0 <systemAccount>"
echo "Example: $0 system/manager"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
echo -------------------------------------
echo Re-Create new user
echo -------------------------------------
sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql Reference Adempiere
echo -------------------------------------
echo Import Reference
echo -------------------------------------
echo imp $1@$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Reference.dmp FROMUSER=\(reference\) TOUSER=reference
imp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Reference.dmp FROMUSER=\(reference\) TOUSER=reference
echo -------------------------------------
echo Check System
echo Import may show some warnings. This is OK as long as the following does not show errors
echo -------------------------------------
sqlplus reference/adempiere@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql

View File

@ -1,23 +0,0 @@
#!/bin/sh
# $Id: PostMigration.sh
echo Oracle Post Migration Scripts
if [ $# -le 2 ]
then
echo "Usage: $0 <systemAccount> <AdempiereID> <AdempierePWD>"
echo "Example: $0 system/manager adempiere adempiere"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org"
exit 1
fi
echo -------------------------------------
echo Add missing translations
echo -------------------------------------
echo sqlplus $2/$3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/01_add_missing_Translations.sql

View File

@ -1,13 +0,0 @@
@Rem $Id: Start.bat,v 1.7 2005/01/22 21:59:15 jjanke Exp $
@Echo Starting Listener ....
lsnrctl start
@Echo Starting Database ....
@sqlplus "system/%ADEMPIERE_DB_SYSTEM%@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% AS SYSDBA" @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Start.sql
@Echo Starting optional agent ....
agentctl start
@Echo ------------------------
lsnrctl status

View File

@ -1,5 +0,0 @@
#!/bin/sh
# $Id: Start.sh,v 1.6 2005/01/22 21:59:15 jjanke Exp $
sqlplus "system/$ADEMPIERE_DB_SYSTEM@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME AS SYSDBA" @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Start.sql

View File

@ -1,11 +0,0 @@
@Rem $Id: Stop.bat,v 1.7 2005/01/22 21:59:15 jjanke Exp $
@Echo Stopping database ....
@sqlplus "system/%ADEMPIERE_DB_SYSTEM%@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% AS SYSDBA" @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Stop.sql
@Echo Stopping Listener ....
lsnrctl stop
@Echo Stopping (optional) Agent ....
agentctl stop

View File

@ -1,10 +0,0 @@
#!/bin/sh
# $Id: Stop.sh,v 1.7 2005/01/22 21:59:15 jjanke Exp $
# In a multi-instance environment set the environment first
# SET ORACLE_SID=
# export ORACLE_SID
sqlplus "system/$ADEMPIERE_DB_SYSTEM@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME AS SYSDBA" @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Stop.sql

View File

@ -1,69 +0,0 @@
CREATE OR REPLACE FUNCTION add_missing_translations() RETURNS void as $func$
DECLARE
ins VARCHAR (2000);
sel VARCHAR (2000);
inssel VARCHAR (4001);
table_id NUMERIC;
t RECORD;
c RECORD;
BEGIN
FOR t IN (SELECT ad_table_id,
SUBSTR (tablename, 1, LENGTH (tablename) - 4) as tablename
FROM AD_TABLE
WHERE tablename LIKE '%_Trl' AND isactive = 'Y'
AND isview = 'N')
LOOP
ins :=
'INSERT INTO '
|| t.tablename
|| '_TRL ('
|| 'ad_language,ad_client_id,ad_org_id,created,createdby,updated,updatedby,isactive,istranslated,'
|| t.tablename
|| '_id';
sel :=
'SELECT l.ad_language,t.ad_client_id,t.ad_org_id,t.created,t.createdby,t.updated,t.updatedby,t.isactive,''N'' as istranslated,'
|| t.tablename
|| '_id';
SELECT ad_table_id
INTO table_id
FROM AD_TABLE
WHERE tablename = t.tablename;
FOR c IN (SELECT col.columnname
FROM AD_COLUMN col INNER JOIN AD_TABLE tab
ON (col.ad_table_id = tab.ad_table_id)
WHERE col.ad_table_id = table_id
AND col.istranslated = 'Y'
AND col.isactive = 'Y'
ORDER BY 1)
LOOP
ins := TRIM (ins) || ',' || TRIM (c.columnname);
sel := TRIM (sel) || ',t.' || TRIM (c.columnname);
END LOOP;
ins := TRIM (ins) || ')';
sel :=
TRIM (sel)
|| ' from '
|| t.tablename
|| ' t, ad_language l WHERE l.issystemlanguage=''Y'' AND NOT EXISTS (SELECT 1 FROM '
|| t.tablename
|| '_TRL b WHERE b.'
|| t.tablename
|| '_id=t.'
|| t.tablename
|| '_id AND b.AD_LANGUAGE=l.AD_LANGUAGE)';
inssel := TRIM (ins) || ' ' || TRIM (sel);
EXECUTE inssel;
END LOOP;
END;
$func$ LANGUAGE plpgsql;
select add_missing_translations();
commit;

View File

@ -1,34 +0,0 @@
@Echo ADEMPIERE Database Export $Revision: 1.2 $
@Rem $Id: DBExport.bat,v 1.2 2005/01/22 21:59:15 jjanke Exp $
@Echo Saving database %1@%ADEMPIERE_DB_NAME% to %ADEMPIERE_HOME%\data\ExpDat.dmp
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameter: userAccount
@if (%1) == () goto usage
@set PGPASSWORD=%2
pg_dump -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -U %1 %ADEMPIERE_DB_NAME% > %ADEMPIERE_HOME%\data\ExpDat.dmp
@set PGPASSWORD=
@cd %ADEMPIERE_HOME%\Data
@jar cvfM ExpDat.jar ExpDat.dmp
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\ADEMPIERE2
@Echo ADEMPIERE_DB_NAME e.g. adempiere or xe
@Echo ADEMPIERE_DB_SERVER e.g. dbserver.adempiere.org
@Echo ADEMPIERE_DB_PORT e.g. 5432 or 1521
:usage
@echo Usage: %0 <userAccount>
@echo Examples: %0 ADEMPIERE/ADEMPIERE
:end

View File

@ -1,32 +0,0 @@
#!/bin/sh
echo ADempiere PostgreSQL Database Export
# $Id: DBExport.sh,v 1.3 2005/01/22 21:59:15 jjanke Exp $
echo Saving database $1@$ADEMPIERE_DB_NAME to $ADEMPIERE_HOME/data/ExpDat.dmp
if [ $# -eq 0 ]
then
echo "Usage: $0 <userAccount>"
echo "Example: $0 adempiere adempiere"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" -o "$ADEMPIERE_DB_SERVER" = "" -o "$ADEMPIERE_DB_PORT" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere or xe"
echo " ADEMPIERE_DB_SERVER e.g. dbserver.adempiere.org"
echo " ADEMPIERE_DB_PORT e.g. 5432 or 1521"
exit 1
fi
PGPASSWORD=$2
export PGPASSWORD
pg_dump -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT --no-owner -U $1 $ADEMPIERE_DB_NAME > $ADEMPIERE_HOME/data/ExpDat.dmp
PGPASSWORD=
export PGPASSWORD
cd $ADEMPIERE_HOME/data
jar cvfM ExpDat.jar ExpDat.dmp

View File

@ -1,51 +0,0 @@
@Echo ADempiere Database Import
@Echo Importing ADempiere DB from %ADEMPIERE_HOME%\data\ExpDat.dmp (%ADEMPIERE_DB_NAME%)
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameters systemAccount AdempiereID AdempierePwd PostgresPwd
@if (%1) == () goto usage
@if (%2) == () goto usage
@if (%3) == () goto usage
@if (%4) == () goto usage
@set PGPASSWORD=%4
@echo -------------------------------------
@echo Re-Create user and database
@echo -------------------------------------
@dropdb -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -U postgres %ADEMPIERE_DB_NAME%
@dropuser -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -U postgres %2
@set ADEMPIERE_CREATE_ROLE_SQL=CREATE ROLE %2 SUPERUSER LOGIN PASSWORD '%3'
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -U postgres -c "%ADEMPIERE_CREATE_ROLE_SQL%"
@set ADEMPIERE_CREATE_ROLE_SQL=
@set PGPASSWORD=%3
@createdb -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -E UNICODE -O %2 -U %2 %ADEMPIERE_DB_NAME%
@echo -------------------------------------
@echo Import Adempiere_pg.dmp
@echo -------------------------------------
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -c "drop schema sqlj cascade"
@set ADEMPIERE_ALTER_ROLE_SQL="ALTER ROLE %2 SET search_path TO adempiere, pg_catalog"
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -c "%ADEMPIERE_ALTER_ROLE_SQL%"
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -f %ADEMPIERE_HOME%/data/ExpDat.dmp
@set ADEMPIERE_ALTER_ROLE_SQL=
@set PGPASSWORD=
@goto end
:environment
@Echo Please make sure that the environment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\ADEMPIERE2
@Echo ADEMPIERE_DB_NAME e.g. adempiere or xe
@Echo ADEMPIERE_DB_SERVER e.g. dbserver.adempiere.org
@Echo ADEMPIERE_DB_PORT e.g. 5432 or 1521
:usage
@echo Usage: %0 <systemAccount> <AdempiereID> <AdempierePwd> <postgresPwd>
@echo Example: %0 postgres Adempiere Adempiere postgrespwd
:end

View File

@ -1,50 +0,0 @@
#!/bin/sh
echo ADempiere Database Import
echo Importing ADempiere DB from $ADEMPIERE_HOME/data/ExpDat.dmp
if [ $# -le 2 ]
then
echo "Usage: $0 <systemAccount> <AdempiereID> <AdempierePWD> <PostgresPWD>"
echo "Example: $0 postgres adempiere adempiere postgrespwd"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" -o "$ADEMPIERE_DB_SERVER" = "" -o "$ADEMPIERE_DB_PORT" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere or xe"
echo " ADEMPIERE_DB_SERVER e.g. dbserver.adempiere.org"
echo " ADEMPIERE_DB_PORT e.g. 5432 or 1521"
exit 1
fi
PGPASSWORD=$4
export PGPASSWORD
echo -------------------------------------
echo Recreate user and database
echo -------------------------------------
dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $ADEMPIERE_DB_NAME
dropuser -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $2
ADEMPIERE_CREATE_ROLE_SQL="CREATE ROLE $2 SUPERUSER LOGIN PASSWORD '$3'"
psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres -c "$ADEMPIERE_CREATE_ROLE_SQL"
ADEMPIERE_CREATE_ROLE_SQL=
PGPASSWORD=$3
export PGPASSWORD
createdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -E UNICODE -O $2 -U $2 $ADEMPIERE_DB_NAME
echo -------------------------------------
echo Import Adempiere_pg.dmp
echo -------------------------------------
psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -c "drop schema sqlj cascade"
ADEMPIERE_ALTER_ROLE_SQL="ALTER ROLE $2 SET search_path TO adempiere, pg_catalog"
psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -c "$ADEMPIERE_ALTER_ROLE_SQL"
psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -f $ADEMPIERE_HOME/data/ExpDat.dmp
PGPASSWORD=
export PGPASSWORD

View File

@ -1,26 +0,0 @@
#!/bin/sh
echo ADempiere PostgreSQL Database Export
# $Id: DBExport.sh,v 1.3 2005/01/22 21:59:15 jjanke Exp $
echo Saving database reference@$ADEMPIERE_DB_NAME to $ADEMPIERE_HOME/data/Adempiere_pg.dmp
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" -o "$ADEMPIERE_DB_SERVER" = "" -o "$ADEMPIERE_DB_PORT" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere or xe"
echo " ADEMPIERE_DB_SERVER e.g. dbserver.adempiere.org"
echo " ADEMPIERE_DB_PORT e.g. 5432 or 1521"
exit 1
fi
PGPASSWORD=reference
export PGPASSWORD
pg_dump -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT --no-owner -U reference $ADEMPIERE_DB_NAME > $ADEMPIERE_HOME/data/Adempiere_pg.dmp
PGPASSWORD=
export PGPASSWORD
cd $ADEMPIERE_HOME/data
jar cvfM Adempiere_pg.jar Adempiere_pg.dmp

View File

@ -1,53 +0,0 @@
@Echo Adempiere Database Import $Revision: 1.3 $
@Rem $Id: ImportAdempiere.bat,v 1.3 2005/01/22 21:59:15 jjanke Exp $
@Echo Importing Adempiere DB from %ADEMPIERE_HOME%\data\Adempiere_pg.dmp (%ADEMPIERE_DB_NAME%)
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
@Rem Must have parameters systemAccount AdempiereID AdempierePwd
@if (%1) == () goto usage
@if (%2) == () goto usage
@if (%3) == () goto usage
@set PGPASSWORD=%4
@echo -------------------------------------
@echo Re-Create user and database
@echo -------------------------------------
@dropdb -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -U postgres %ADEMPIERE_DB_NAME%
@dropuser -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -U postgres %2
@set ADEMPIERE_CREATE_ROLE_SQL=CREATE ROLE %2 SUPERUSER LOGIN PASSWORD '%3'
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -U postgres -c "%ADEMPIERE_CREATE_ROLE_SQL%"
@set ADEMPIERE_CREATE_ROLE_SQL=
@set PGPASSWORD=%3
@createdb -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -E UNICODE -O %2 -U %2 %ADEMPIERE_DB_NAME%
@echo -------------------------------------
@echo Import Adempiere_pg.dmp
@echo -------------------------------------
@set ADEMPIERE_ALTER_ROLE_SQL=ALTER ROLE %2 SET search_path TO adempiere, sqlj, pg_catalog
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -c "%ADEMPIERE_ALTER_ROLE_SQL%"
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -c "drop schema sqlj cascade"
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -f %ADEMPIERE_HOME%/data/Adempiere_pg.dmp
@set ADEMPIERE_ALTER_ROLE_SQL=
@set PGPASSWORD=
@goto end
:environment
@Echo Please make sure that the enviroment variables are set correctly:
@Echo ADEMPIERE_HOME e.g. D:\ADEMPIERE2
@Echo ADEMPIERE_DB_NAME e.g. adempiere or xe
@Echo ADEMPIERE_DB_SERVER e.g. dbserver.adempiere.org
@Echo ADEMPIERE_DB_PORT e.g. 5432 or 1521
:usage
@echo Usage: %0 <systemAccount> <AdempiereID> <AdempierePwd> <PostgresPwd>
@echo Example: %0 postgres Adempiere Adempiere postgresPwd
:end

View File

@ -1,50 +0,0 @@
#!/bin/sh
# $Id: ImportAdempiere.sh,v 1.10 2005/12/20 07:12:17 jjanke Exp $
echo Adempiere Database Import $Revision: 1.10 $
echo Importing Adempiere DB from $ADEMPIERE_HOME/data/Adempiere_pg.dmp
if [ $# -le 2 ]
then
echo "Usage: $0 <systemAccount> <AdempiereID> <AdempierePWD> <PostgresPwd>"
echo "Example: $0 postgres adempiere adempiere postgresPwd"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" -o "$ADEMPIERE_DB_SERVER" = "" -o "$ADEMPIERE_DB_PORT" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere or xe"
echo " ADEMPIERE_DB_SERVER e.g. dbserver.adempiere.org"
echo " ADEMPIERE_DB_PORT e.g. 5432 or 1521"
exit 1
fi
PGPASSWORD=$4
export PGPASSWORD
echo -------------------------------------
echo Recreate user and database
echo -------------------------------------
dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $ADEMPIERE_DB_NAME
dropuser -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $2
ADEMPIERE_CREATE_ROLE_SQL="CREATE ROLE $2 SUPERUSER LOGIN PASSWORD '$3'"
psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres -c "$ADEMPIERE_CREATE_ROLE_SQL"
ADEMPIERE_CREATE_ROLE_SQL=
PGPASSWORD=$3
export PGPASSWORD
createdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -E UNICODE -O $2 -U $2 $ADEMPIERE_DB_NAME
echo -------------------------------------
echo Import Adempiere_pg.dmp
echo -------------------------------------
ADEMPIERE_ALTER_ROLE_SQL="ALTER ROLE $2 SET search_path TO adempiere, sqlj, pg_catalog"
psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -c "$ADEMPIERE_ALTER_ROLE_SQL"
psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -c "drop schema sqlj cascade"
psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -f $ADEMPIERE_HOME/data/Adempiere_pg.dmp
ADEMPIERE_ALTER_ROLE_SQL=
PGPASSWORD=
export PGPASSWORD

View File

@ -1,29 +0,0 @@
#!/bin/sh
# $Id: PostMigration.sh
echo Postgresql Post Migration Scripts
if [ $# -le 2 ]
then
echo "Usage: $0 <systemAccount> <AdempiereID> <AdempierePWD> <PostgresPwd>"
echo "Example: $0 postgres adempiere adempiere postgresPwd"
exit 1
fi
if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" -o "$ADEMPIERE_DB_SERVER" = "" -o "$ADEMPIERE_DB_PORT" = "" ]
then
echo "Please make sure that the environment variables are set correctly:"
echo " ADEMPIERE_HOME e.g. /Adempiere"
echo " ADEMPIERE_DB_NAME e.g. adempiere or xe"
echo " ADEMPIERE_DB_SERVER e.g. dbserver.adempiere.org"
echo " ADEMPIERE_DB_PORT e.g. 5432 or 1521"
exit 1
fi
PGPASSWORD=$3
export PGPASSWORD
echo -------------------------------------
echo Add missing translations
echo -------------------------------------
psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -f $ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/01_add_missing_translations.sql
PGPASSWORD=
export PGPASSWORD

View File

@ -1,10 +0,0 @@
@Title Start PostgreSQL DB Service
@Rem $Id: Start.bat,v 1.4 2002/10/01 21:25:19 jjanke Exp $
@Rem IPC demon may be required for cygwin
@Rem ipc-daemon&
pg_ctl -o "-i" -l $PGLOG start
@pause

View File

@ -1,10 +0,0 @@
#!/bin/sh
echo Start PostgreSQL DB Service
# $Id: Start.sh,v 1.3 2002/04/26 03:20:09 jjanke Exp $
# IPC demon may be required for cygwin
# ipc-daemon&
pg_ctl -o "-i" -l $PGLOG start

View File

@ -1,7 +0,0 @@
@Title Stop PostgreSQL DB Service
@Rem $Id: Stop.bat,v 1.2 2002/04/24 01:52:59 jjanke Exp $
pg_ctl stop
@pause

View File

@ -1,9 +0,0 @@
#!/bin/sh
echo Stop Oracle DB Service
# $Id: Stop.sh,v 1.2 2002/04/24 01:52:59 jjanke Exp $
pg_ctl stop

View File

@ -1,2 +0,0 @@
-- Connection Test
SELECT 'Success ' AS Connection;

View File

@ -1,11 +0,0 @@
{
Description = "Adempiere";
Provides = ("adempiere");
Requires = ("postgresql-8.3");
Preference = "Late";
Messages =
{
start = "Starting Adempiere";
stop = "Stopping Adempiere";
};
}

View File

@ -1,124 +0,0 @@
#!/bin/sh
. /etc/rc.common
# Adempiere Service script for OS/X
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
export POSTGRES_HOME=/Library/PostgreSQL/8.3
export ADEMPIERE_HOME=/Applications/Adempiere
export PATH=$PATH:$JAVA_HOME/bin/:$POSTGRES_HOME/bin/
EXECDIR=/Applications/Adempiere
ENVFILE=/etc/profile
RETVAL=0
ADEMPIERESTATUS=
MAXITERATIONS=60 # 2 seconds every iteration, max wait 2 minutes)
RunService ()
{
case $1 in
start ) StartService ;;
stop ) StopService ;;
restart) RestartService ;;
status ) StatusService ;;
* ) echo "$0: unknown argument: $1";;
esac
}
StatusService ()
{
ADEMPIERESTATUSSTRING=$(ps ax | grep -v grep | grep server| grep $EXECDIR)
echo $ADEMPIERESTATUSSTRING | grep $EXECDIR
#ADEMPIERESTATUS=$?
}
StartService ()
{
ADEMPIERESTATUS=$(ps ax | grep -v grep | grep server| grep $EXECDIR|wc -l)
if [ $ADEMPIERESTATUS != 0 ] ; then
ConsoleMessage "adempiere is already running"
return 1
fi
ConsoleMessage "Starting ADempiere ERP: "
export LOGFILE=$ADEMPIERE_HOME/jboss/server/adempiere/log/adempiere_`date +%Y%m%d%H%M%S`.log
export LOOKFILE=$ADEMPIERE_HOME/jboss/server/adempiere/log/server.log
su root -c "cd $EXECDIR/utils;$EXECDIR/utils/RUN_Server2.sh &> $LOGFILE &"
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
# wait for server to be confirmed as started in logfile
STATUSTEST=0
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
sleep 2
tail -n 5 $LOOKFILE | grep 'Server\].*Started in' &> /dev/null && STATUSTEST=1
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]
then
break
fi
done
if [ $STATUSTEST -eq 0 ]
then
ConsoleMessage "Service hasn't started within the timeout allowed, please review file $LOGFILE to see the status of the service"
else
ConsoleMessage "Adempiere Started"
fi
echo
else
ConsoleMessage "Admpiere Failed"
echo
fi
return $RETVAL
}
StopService()
{
ADEMPIERESTATUS=$(ps ax | grep -v grep | grep server| grep $EXECDIR|wc -l)
if [ $ADEMPIERESTATUS = 0 ] ; then
echo "adempiere is already stopped"
return 1
fi
ConsoleMessage "Stopping ADempiere ERP: "
export LASTLOG=`ls -t $ADEMPIERE_HOME/jboss/server/adempiere/log/adempiere_??????????????.log | head -1`
export LOOKFILE=$ADEMPIERE_HOME/jboss/server/adempiere/log/server.log
su root -c "cd $EXECDIR/utils;$EXECDIR/utils/RUN_Server2Stop.sh &> /dev/null &"
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
# wait for server to be confirmed as halted in logfile
STATUSTEST=0
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
sleep 2
tail -n 5 $LOOKFILE | grep 'Shutdown complete' &> /dev/null && STATUSTEST=1
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]
then
break
fi
done
if [ $STATUSTEST -eq 0 ]
then
ConsoleMessage "Service hasn't stopped within the timeout allowed, please review file $LASTLOG to see the status of the service"
else
ConsoleMessage "Adempiere Stopped"
fi
echo
else
ConsoleMessage "Adempiere Failed to Stop"
echo
fi
return $RETVAL
}
RestartService ()
{
StopService
sleep 2
StartService
}
RunService "$1"

View File

@ -1,189 +0,0 @@
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: adempiere adempiere-3.5
# Required-Start: postgresql
# Required-Stop: postgresql
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: ADempiere 3.5 server
# Description: Provides ADempiere ERP-CRM Server startup and shutdown script. Requires PostgreSQL server.
# FileTarget: /etc/init.d/adempiere
# FileOwner: root.root
# FilePerms: 0755
#
# chkconfig: 2345 97 06
### END INIT INFO
# initialization
# adjust these variables to your environment
EXECDIR=/opt/adempiere/Adempiere
ADEMPIEREUSER=adempiere
# Instead of using ENVFILE you can set JAVA_HOME, ADEMPIERE_HOME and add JAVA_HOME/bin to PATH
# in this case you can comment the source lines for ENVFILE below
# detected some problems with Hardy Heron ubuntu using the bash source command
ENVFILE=/home/adempiere/.bashrc
# STOPMESSAGE="Halting VM" # Message when using java 5
STOPMESSAGE="INFO.*Server\].*Shutdown complete" # Message when using java 6
. /lib/lsb/init-functions
RETVAL=0
ADEMPIERESTATUS=
MAXITERATIONS=60 # 2 seconds every iteration, max wait 2 minutes)
getadempierestatus() {
ADEMPIERESTATUSSTRING=$(ps ax | grep -v grep | grep $EXECDIR)
echo $ADEMPIERESTATUSSTRING | grep -q $EXECDIR
ADEMPIERESTATUS=$?
}
start () {
getadempierestatus
if [ $ADEMPIERESTATUS -eq 0 ] ; then
echo "ADempiere is already running"
return 1
fi
echo -n "Starting ADempiere ERP: "
. $ENVFILE
export LOGFILE=$ADEMPIERE_HOME/jboss/server/adempiere/log/adempiere_`date +%Y%m%d%H%M%S`.log
su $ADEMPIEREUSER -c "mkdir -p $ADEMPIERE_HOME/jboss/server/adempiere/log"
su $ADEMPIEREUSER -c "cd $EXECDIR/utils;$EXECDIR/utils/RUN_Server2.sh &> $LOGFILE &"
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
# wait for server to be confirmed as started in logfile
STATUSTEST=0
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
sleep 2
tail -n 9 $LOGFILE | grep -q 'INFO.*\[Server\].*Started in' && STATUSTEST=1
echo -n "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]
then
break
fi
done
if [ $STATUSTEST -eq 0 ]
then
log_warning_msg "Service hasn't started within the timeout allowed, please review file $LOGFILE to see the status of the service"
else
log_success_msg "Service started"
fi
echo
else
log_failure_msg "Service not started"
echo
fi
return $RETVAL
}
stop () {
getadempierestatus
if [ $ADEMPIERESTATUS -ne 0 ] ; then
echo "ADempiere is already stopped"
return 1
fi
echo -n "Stopping ADempiere ERP: "
. $ENVFILE
# export LASTLOG=`ls -t $ADEMPIERE_HOME/jboss/server/adempiere/log/adempiere_??????????????.log | head -1`
export LASTLOG=$ADEMPIERE_HOME/jboss/server/adempiere/log/server.log
su $ADEMPIEREUSER -c "cd $EXECDIR/utils;$EXECDIR/utils/RUN_Server2Stop.sh &> /dev/null &"
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
# wait for server to be confirmed as halted in logfile
STATUSTEST=0
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
sleep 2
tail -n 9 $LASTLOG | grep -q "$STOPMESSAGE" && STATUSTEST=1
echo -n "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]
then
break
fi
done
if [ $STATUSTEST -eq 0 ]
then
log_warning_msg "Service hasn't stopped within the timeout allowed, please review file $LASTLOG to see the status of the service"
log_warning_msg "Trying direct kill with signal -15"
# Adempiere didn't finish - try direct kill with signal 15, then signal 9
kill -15 `ps ax | grep -v grep | grep $EXECDIR | sed -e 's/^ *//g' | cut -f 1 -d " "`
sleep 5
getadempierestatus
if [ $ADEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with kill -15"
else
echo "Trying direct kill with signal -9"
kill -9 `ps ax | grep -v grep | grep $EXECDIR | sed -e 's/^ *//g' | cut -f 1 -d " "`
sleep 5
getadempierestatus
if [ $ADEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with kill -9"
else
log_warning_msg "Service hasn't stopped"
fi
fi
else
log_success_msg "Service stopped"
fi
echo
else
log_failure_msg "Service not stopped"
echo
fi
return $RETVAL
}
restart () {
stop
sleep 1
start
}
condrestart () {
getadempierestatus
if [ $ADEMPIERESTATUS -eq 0 ] ; then
restart
fi
}
rhstatus () {
getadempierestatus
if [ $ADEMPIERESTATUS -eq 0 ] ; then
echo
echo "ADempiere is running:"
ps ax | grep -v grep | grep $EXECDIR | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo
else
echo "ADempiere is stopped"
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
restart
;;
restart)
restart
;;
condrestart)
condrestart
;;
status)
rhstatus
;;
*)
echo $"Usage: $0 {start|stop|reload|restart|condrestart|status}"
exit 1
esac
exit 0

View File

@ -1,186 +0,0 @@
#!/bin/bash
#
# FileName: adempiere.init
# Description: adempiere erp software startup and shutdown
# Vendor: K.K. Alice
# Created: 05. April 2004
# Author: S. Christians
# Updated: Carlos Ruiz - globalqss - tested in Redhat FC4
# Carlos Ruiz - globalqss - added timeout review of the log file
#
# FileTarget: /etc/init.d/adempiere
# FileOwner: root.root
# FilePerms: 0755
#
# chkconfig: 2345 97 06
# $Id: adempiere,v 1.1 2006/03/16 05:00:28 cruiz Exp $
# initialization
# adjust these variables to your environment
EXECDIR=/home/adempiere/Adempiere
ENVFILE=/home/adempiere/.bash_profile
ADEMPIEREUSER=adempiere
# STOPMESSAGE="Halting VM" # Message when using java 5
STOPMESSAGE="INFO.*Server\].*Shutdown complete" # Message when using java 6
. /etc/rc.d/init.d/functions
RETVAL=0
ADEMPIERESTATUS=
MAXITERATIONS=60 # 2 seconds every iteration, max wait 2 minutes)
getadempierestatus() {
ADEMPIERESTATUSSTRING=$(ps ax | grep -v grep | grep $EXECDIR)
echo $ADEMPIERESTATUSSTRING | grep -q $EXECDIR
ADEMPIERESTATUS=$?
}
start () {
getadempierestatus
if [ $ADEMPIERESTATUS -eq 0 ] ; then
echo "adempiere is already running"
return 1
fi
echo -n "Starting ADempiere ERP: "
source $ENVFILE
export LOGFILE=$ADEMPIERE_HOME/jboss/server/adempiere/log/adempiere_`date +%Y%m%d%H%M%S`.log
su $ADEMPIEREUSER -c "mkdir -p $ADEMPIERE_HOME/jboss/server/adempiere/log"
su $ADEMPIEREUSER -c "cd $EXECDIR/utils;$EXECDIR/utils/RUN_Server2.sh &> $LOGFILE &"
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
# wait for server to be confirmed as started in logfile
STATUSTEST=0
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
sleep 2
tail -n 9 $LOGFILE | grep -q 'INFO.*\[Server\].*Started in' && STATUSTEST=1
echo -n "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]
then
break
fi
done
if [ $STATUSTEST -eq 0 ]
then
echo "Service hasn't started within the timeout allowed, please review file $LOGFILE to see the status of the service"
echo_warning
else
echo_success
fi
echo
else
echo_failure
echo
fi
return $RETVAL
}
stop () {
getadempierestatus
if [ $ADEMPIERESTATUS -ne 0 ] ; then
echo "adempiere is already stopped"
return 1
fi
echo -n "Stopping ADempiere ERP: "
source $ENVFILE
# export LASTLOG=`ls -t $ADEMPIERE_HOME/jboss/server/adempiere/log/adempiere_??????????????.log | head -1`
export LASTLOG=$ADEMPIERE_HOME/jboss/server/adempiere/log/server.log
su $ADEMPIEREUSER -c "cd $EXECDIR/utils;$EXECDIR/utils/RUN_Server2Stop.sh &> /dev/null &"
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
# wait for server to be confirmed as halted in logfile
STATUSTEST=0
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
sleep 2
tail -n 9 $LASTLOG | grep -q "$STOPMESSAGE" && STATUSTEST=1
echo -n "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]
then
break
fi
done
if [ $STATUSTEST -eq 0 ]
then
echo "Service hasn't stopped within the timeout allowed, please review file $LASTLOG to see the status of the service"
echo "Trying direct kill with signal -15"
# Adempiere didn't finish - try direct kill with signal 15, then signal 9
kill -15 `ps ax | grep -v grep | grep $EXECDIR | sed -e 's/^ *//g' | cut -f 1 -d " "`
sleep 5
getadempierestatus
if [ $ADEMPIERESTATUS -ne 0 ] ; then
echo_success
else
echo "Trying direct kill with signal -9"
kill -9 `ps ax | grep -v grep | grep $EXECDIR | sed -e 's/^ *//g' | cut -f 1 -d " "`
sleep 5
getadempierestatus
if [ $ADEMPIERESTATUS -ne 0 ] ; then
echo_success
else
echo_warning
fi
fi
else
echo_success
fi
echo
else
echo_failure
echo
fi
return $RETVAL
}
restart () {
stop
sleep 2
start
}
condrestart () {
getadempierestatus
if [ $ADEMPIERESTATUS -eq 0 ] ; then
restart
fi
}
rhstatus () {
getadempierestatus
if [ $ADEMPIERESTATUS -eq 0 ] ; then
echo
echo "adempiere is running:"
ps ax | grep -v grep | grep $EXECDIR | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo
else
echo "adempiere is stopped"
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
restart
;;
restart)
restart
;;
condrestart)
condrestart
;;
status)
rhstatus
;;
*)
echo $"Usage: $0 {start|stop|reload|restart|condrestart|status}"
exit 1
esac
exit 0

View File

@ -1,29 +0,0 @@
Date: 2004-05-05 21:59
Sender: kkalice
Here is a startup sript we made for the adempiere server
(running on Fedora Core 1).
It assumes there is a user "adempiere" with a home directory
"/opt/adempiere" who has all the necessary environment
settings in "/opt/adempiere/.bash_profile".
The script will have to be adjusted to your own environment
by setting the appropriate variables.
One advantage of this script is that it really waits until
the server declares it is started up or shut down before
echoing "[OK]" to the screen.
A major disadvantage is that it runs the server as root,
which is necessary to log the output to the
/var/log/adempiere.log.
------
Date: 2006-12-17 13:10
Sender: Carlos Ruiz - globalqss
Modified the startup script:
- now it makes su to adempiere user
- create the log based on date/time
- timeout added
- tested with Fedora Core 4

Some files were not shown because too many files have changed in this diff Show More