move branch adempire311 to trunk

This commit is contained in:
vpj-cd 2006-11-17 03:14:43 +00:00
parent 0429dfc79f
commit 6b9071b618
82 changed files with 2014 additions and 0 deletions

11
utils/.project Normal file
View File

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

54
utils/RUN_Adempiere.bat Normal file
View File

@ -0,0 +1,54 @@
@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 CLASSPATH=lib\Adempiere.jar;lib\AdempiereCLib.jar;%CLASSPATH%
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
@Set CLASSPATH=%ADEMPIERE_HOME%\lib\Adempiere.jar;%ADEMPIERE_HOME%\lib\AdempiereCLib.jar;%CLASSPATH%
: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 -DADEMPIERE_HOME=%ADEMPIERE_HOME% %PROP% %SECURE% -classpath %CLASSPATH% org.compiere.Adempiere
@sleep 15

42
utils/RUN_Adempiere.sh Normal file
View File

@ -0,0 +1,42 @@
#!/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:$CLASSPATH
else
CLASSPATH=lib/Adempiere.jar:lib/AdempiereCLib.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
# To switch between multiple installs, copy the created Adempiere.properties file
# Select the configuration by setting the PROP variable
PROP=
#PROP=-DPropertyFile=test.properties
# 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=
$JAVA -Xms32m -Xmx512m -DADEMPIERE_HOME=$ADEMPIERE_HOME $PROP $SECURE -classpath $CLASSPATH org.compiere.Adempiere

15
utils/RUN_DBExport.bat Normal file
View File

@ -0,0 +1,15 @@
@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)
@Echo Sleeping ... (remove command if you are on XP)
@sleep 60

19
utils/RUN_DBExport.sh Normal file
View File

@ -0,0 +1,19 @@
# 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

15
utils/RUN_DBRestore.bat Normal file
View File

@ -0,0 +1,15 @@
@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>
@call %ADEMPIERE_DB_PATH%\DBRestore system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD%
@pause

16
utils/RUN_DBRestore.sh Normal file
View File

@ -0,0 +1,16 @@
# $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>
sh $ADEMPIERE_DB_PATH/DBRestore.sh system/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD

9
utils/RUN_DBStart.bat Normal file
View File

@ -0,0 +1,9 @@
@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%)
@sleep 60

10
utils/RUN_DBStart.sh Normal file
View File

@ -0,0 +1,10 @@
# $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

9
utils/RUN_DBStop.bat Normal file
View File

@ -0,0 +1,9 @@
@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%)
@sleep 60

10
utils/RUN_DBStop.sh Normal file
View File

@ -0,0 +1,10 @@
# $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

64
utils/RUN_Env.bat Normal file
View File

@ -0,0 +1,64 @@
@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

55
utils/RUN_Env.sh Normal file
View File

@ -0,0 +1,55 @@
# $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

@ -0,0 +1,22 @@
@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

@ -0,0 +1,26 @@
#!/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

@ -0,0 +1,15 @@
@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>
@call %ADEMPIERE_DB_PATH%\ImportAdempiere system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD%
@pause

View File

@ -0,0 +1,19 @@
#!/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\)
echo Re-Create Adempiere 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.dmp
echo Press enter to continue ...
read in
# Parameter: <systemAccount> <AdempiereID> <AdempierePwd>
sh $ADEMPIERE_DB_PATH/ImportAdempiere.sh system/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD

View File

@ -0,0 +1,15 @@
@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

@ -0,0 +1,19 @@
#!/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\)
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.dmp
echo Press enter to continue ...
read in
# Parameter: <systemAccount> <AdempiereID> <AdempierePwd>
sh $ADEMPIERE_DB_PATH/ImportAdempiere.sh system/$ADEMPIERE_DB_SYSTEM reference reference

40
utils/RUN_Migrate.bat Normal file
View File

@ -0,0 +1,40 @@
@Rem $Id: RUN_Migrate.bat,v 1.13 2006/01/23 04:56:03 jjanke Exp $
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Adempiere Version Migration - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@Echo Version Migration is an optional service for a fee.
@Echo Please check http://www.adempiere.org/migrate/
@REM Optional Set Source/Reference Database
@REM This requires that RUN_ImportReference was completed
@REM The default is:
@REM SET SOURCEDB=%ADEMPIERE_DB_URL% reference reference
@REM Optionally Set Target Database
@REM If you set the target database, the Source Database need to be set too!!
@REM If not, the default connection will be used:
@REM SET TARGETDB=%ADEMPIERE_DB_URL% adempiere adempiere
@Rem Example connecting to database user adempiere/adempierePw in instance dev2 on server dev2server
@REM SET TARGETDB=jdbc:oracle:thin:@//dev2server:1521:dev2.adempiere.org adempiere adempierePw
@echo -------------------------------------
@echo Start UI
@echo -------------------------------------
@"%ADEMPIERE_JAVA%" %ADEMPIERE_JAVA_OPTIONS% -cp %CLASSPATH% com.adempiere.client.StartMaintain %SOURCEDB% %TARGETDB%
@echo -------------------------------------
@echo Create SQLJ
@echo -------------------------------------
@call %ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\create %ADEMPIERE_DB_USER%/%ADEMPIERE_DB_PASSWORD%
@echo -------------------------------------
@echo Check System
@echo -------------------------------------
@sqlplus %ADEMPIERE_DB_USER%/%ADEMPIERE_DB_PASSWORD%@%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\AfterImport.sql
@pause

30
utils/RUN_Migrate.sh Normal file
View File

@ -0,0 +1,30 @@
#!/bin/sh
#
# $Id: RUN_Migrate.sh,v 1.7 2006/01/23 04:56:12 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
echo Adempiere Version Migration - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\)
echo .
echo Version Migration is an optional service for a fee.
echo Please check http://www.adempiere.com/migrate/
echo .
# Optional Set Source/Refence Database
# This requires that RUN_ImportReference was completed
# The default is:
# SOURCEDB="$ADEMPIERE_DB_URL reference reference"
# export SOURCEDB
# Optionally Set Target Database
# If you set the target database, the Source Database need to be set too!!
# If not, the default connection will be used:
# TARGETDB="$ADEMPIERE_DB_URL $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD"
# export TARGETDB
$ADEMPIERE_JAVA $ADEMPIERE_JAVA_OPTIONS -cp $CLASSPATH com.adempiere.client.StartMaintain $SOURCEDB $TARGETDB

View File

@ -0,0 +1,23 @@
@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

@ -0,0 +1,25 @@
#!/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

30
utils/RUN_Server2.bat Normal file
View File

@ -0,0 +1,30 @@
@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 $
@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=
@IF '%ADEMPIERE_APPS_TYPE%' == 'jboss' GOTO JBOSS
@GOTO UNSUPPORTED
:JBOSS
@Set NOPAUSE=Yes
@Set JAVA_OPTS=-server %ADEMPIERE_JAVA_OPTIONS% %SECURE%
@Echo Start Adempiere Apps Server %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@Call %JBOSS_HOME%\bin\run -c adempiere -b %ADEMPIERE_APPS_SERVER%
@Echo Done Adempiere Apps Server %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
@GOTO END
:UNSUPPORTED
@Echo Apps Server start of %ADEMPIERE_APPS_TYPE% not supported
:END
@Sleep 60
@Exit

22
utils/RUN_Server2.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/sh
# Adempiere Server Start
#
# $Id: RUN_Server2.sh,v 1.22 2005/10/26 00:38:18 jjanke Exp $
if [ $ADEMPIERE_HOME ]; then
cd $ADEMPIERE_HOME/utils
fi
. ./myEnvironment.sh Server
# 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=
# headless option if you don't have X installed on the server
JAVA_OPTS="-server $ADEMPIERE_JAVA_OPTIONS $SECURE -Djava.awt.headless=true"
export JAVA_OPTS
$JBOSS_HOME/bin/run.sh -c adempiere -b $ADEMPIERE_APPS_SERVER

26
utils/RUN_Server2Stop.bat Normal file
View File

@ -0,0 +1,26 @@
@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
@sleep 30
@Exit

21
utils/RUN_Server2Stop.sh Normal file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# Adempiere Server Start
#
# $Id: RUN_Server2Stop.sh,v 1.8 2005/09/06 02:46:16 jjanke Exp $
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 shutdown.sh --server=jnp://$ADEMPIERE_APPS_SERVER:$ADEMPIERE_JNP_PORT
. $JBOSS_HOME/bin/shutdown.sh --server=jnp://$ADEMPIERE_APPS_SERVER:$ADEMPIERE_JNP_PORT --shutdown

9
utils/RUN_Start.bat Normal file
View File

@ -0,0 +1,9 @@
@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

9
utils/RUN_Stop.bat Normal file
View File

@ -0,0 +1,9 @@
@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

14
utils/RUN_TrlExport.bat Normal file
View File

@ -0,0 +1,14 @@
@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

20
utils/RUN_TrlExport.sh Normal file
View File

@ -0,0 +1,20 @@
# $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

14
utils/RUN_TrlImport.bat Normal file
View File

@ -0,0 +1,14 @@
@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

20
utils/RUN_TrlImport.sh Normal file
View File

@ -0,0 +1,20 @@
# $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

@ -0,0 +1,24 @@
#!/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 ===================================
echo Please add ADEMPIERE_HOME and JAVA_HOME to your environment
JAVA_HOME=@JAVA_HOME@
export JAVA_HOME
ADEMPIERE_HOME=@ADEMPIERE_HOME@
export ADEMPIERE_HOME
echo You chould also have set LD_LIBRARY_PATH
# 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

@ -0,0 +1,9 @@
@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@"

69
utils/WinEnv.js Normal file
View File

@ -0,0 +1,69 @@
// 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

@ -0,0 +1,30 @@
<?xml version = "1.0" encoding = "UTF-8"?>
<jnlp spec = "1.5+" version = "3.1.1"
codebase = "http://@ADEMPIERE_APPS_SERVER@/admin/adempiereHome"
href = "http://@ADEMPIERE_APPS_SERVER@/admin/adempiereHome/adempiereDirect.jnlp">
<information>
<title>Adempiere Client 3.1.1 @ADEMPIERE_APPS_SERVER@ Direct</title>
<vendor>ComPiere, Inc.</vendor>
<homepage href = "http://www.adempiere.org"/>
<offline-allowed/>
<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@/admin/C32.gif"/>
<shortcut online="true">
<desktop/>
<menu submenu="Adempiere 3.1.1 @ADEMPIERE_APPS_SERVER@ Direct"/>
</shortcut>
</information>
<resources>
<j2se version = "1.5+" 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"/>
<property name="adempiereJNLP" value="@ADEMPIERE_APPS_SERVER@"/>
</resources>
<application-desc main-class = "org.compiere.Adempiere"/>
<security>
<all-permissions/>
</security>
</jnlp>

View File

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

View File

@ -0,0 +1,7 @@
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

@ -0,0 +1,21 @@
@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 inique 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)
@Echo Creating ExpDat_%DATE:~7,2%.jar
jar cvfM ExpDat_%DATE:~7,2%.jar %ADEMPIERE_HOME%\data\ExpDat.dmp
@dir ExpDat_%DATE:~7,2%.jar
@Echo Copy comes here ...
@sleep 30

View File

@ -0,0 +1,5 @@
# Copy Database after backup
# $Id: myDBcopyTemplate.sh,v 1.1 2002/10/07 01:23:32 jjanke Exp $
echo copy $ADEMPIERE_HOME/data/ExpDat.jar to backup media

View File

@ -0,0 +1,56 @@
@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_USER=@ADEMPIERE_DB_USER@
@SET ADEMPIERE_DB_PASSWORD=@ADEMPIERE_DB_PASSWORD@
@SET ADEMPIERE_DB_URL=@ADEMPIERE_DB_URL@
@Rem Oracle specifics
@SET ADEMPIERE_DB_PATH=@ADEMPIERE_DB_TYPE@
@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

@ -0,0 +1,77 @@
#!/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_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
# Oracle Specifics ...
ADEMPIERE_DB_PATH=oracle
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

33
utils/oracle/DBExport.bat Normal file
View File

@ -0,0 +1,33 @@
@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
@Rem Must have parameter: userAccount
@if (%1) == () goto usage
@Rem Clanup
@sqlplus %1/%2@%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
@Rem The Export
@exp %1/%2@%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

28
utils/oracle/DBExport.sh Normal file
View File

@ -0,0 +1,28 @@
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_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Daily.sql
# Export
exp $1/$2@$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

@ -0,0 +1,32 @@
@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
@Rem Must have parameter: systemAccount
@if (%1) == () goto usage
@sqlplus %1/%2@%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
@exp %1/%2@%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

@ -0,0 +1,25 @@
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_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

@ -0,0 +1,46 @@
@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
@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_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\CreateUser.sql %2 %3
@echo -------------------------------------
@echo Import ExpDat
@echo -------------------------------------
@imp %1@%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_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

40
utils/oracle/DBRestore.sh Normal file
View File

@ -0,0 +1,40 @@
# $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_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
echo -------------------------------------
echo Import ExpDat
echo -------------------------------------
imp $1@$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_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql

View File

@ -0,0 +1,46 @@
@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
@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_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\CreateUser.sql %2 %3
@echo -------------------------------------
@echo Import Adempiere.dmp
@echo -------------------------------------
@imp %1@%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_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

@ -0,0 +1,43 @@
# $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_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
sqlplus $1@$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
echo -------------------------------------
echo Import Adempiere.dmp
echo -------------------------------------
echo "imp $1@$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp FROMUSER=\(reference\) TOUSER=$2"
imp $1@$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_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql
sqlplus $2/$3@$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql

View File

@ -0,0 +1,39 @@
@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
@Rem Must have parameter: systemAccount
@if (%1) == () goto usage
@echo -------------------------------------
@echo Re-Create new user
@echo -------------------------------------
@sqlplus %1@%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_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

@ -0,0 +1,37 @@
# $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_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_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_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql

13
utils/oracle/Start.bat Normal file
View File

@ -0,0 +1,13 @@
@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_NAME% AS SYSDBA" @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Start.sql
@Echo Starting optional agent ....
agentctl start
@Echo ------------------------
lsnrctl status

3
utils/oracle/Start.sh Normal file
View File

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

11
utils/oracle/Stop.bat Normal file
View File

@ -0,0 +1,11 @@
@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_NAME% AS SYSDBA" @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Stop.sql
@Echo Stopping Listener ....
lsnrctl stop
@Echo Stopping (optional) Agent ....
agentctl stop

8
utils/oracle/Stop.sh Normal file
View File

@ -0,0 +1,8 @@
# $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_NAME AS SYSDBA" @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Stop.sql

28
utils/pg/DBExport.bat Normal file
View File

@ -0,0 +1,28 @@
@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
@Rem Must have parameter: userAccount
@if (%1) == () goto usage
@exp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDat.dmp Log=%ADEMPIERE_HOME%\data\ExpDat.log CONSISTENT=Y OWNER=Adempiere
@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:\Adempiere
@Echo ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org
:usage
@echo Usage: %0 <userAccount>
@echo Examples: %0 adempiere/adempiere
:end

8
utils/pg/DBExport.sh Normal file
View File

@ -0,0 +1,8 @@
echo Adempiere PostgreSQL Database Export $Revision: 1.3 $
# $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.dump.tar.gz
pg_dump -F c -f $ADEMPIERE_HOME/data/ExpDat.dump.tar.gz adempiere

28
utils/pg/DBExportFull.bat Normal file
View File

@ -0,0 +1,28 @@
@Echo Adempiere Full Database Export $Revision: 1.2 $
@Rem $Id: DBExportFull.bat,v 1.2 2005/01/22 21:59:15 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
@Rem Must have parameter: systemAccount
@if (%1) == () goto usage
@exp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDatFull.dmp Log=%ADEMPIERE_HOME%\data\ExpDat.log CONSISTENT=Y FULL=Y
@cd %ADEMPIERE_HOME%\data
@jar cvfM data\ExpDatFull.jar ExpDatFull.dmp
@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

25
utils/pg/DBExportFull.sh Normal file
View File

@ -0,0 +1,25 @@
echo Adempiere Full Database Export $Revision: 1.2 $
# $Id: DBExportFull.sh,v 1.2 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_NAME FILE=$ADEMPIERE_HOME/data/ExpDatFull.dmp Log=$ADEMPIERE_HOME/data/ExpDat.log CONSISTENT=Y FULL=Y
cd $ADEMPIERE_HOME/data
jar cvfM ExpDatFull.jar ExpDatFull.dmp

41
utils/pg/DBRestore.bat Normal file
View File

@ -0,0 +1,41 @@
@Echo Adempiere Database Restore $Revision: 1.2 $
@Rem $Id: DBRestore.bat,v 1.2 2005/01/22 21:59:15 jjanke Exp $
@Echo Restoring Adempiere DB from %ADEMPIERE_HOME%\data\ExpDat.dmp
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () 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_NAME% @%ADEMPIERE_HOME%\utils\CreateUser.sql %2 %3
@echo -------------------------------------
@echo Import ExpDat
@echo -------------------------------------
@imp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDat.dmp FROMUSER=(%2) TOUSER=%2
@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_NAME% @%ADEMPIERE_HOME%\utils\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

37
utils/pg/DBRestore.sh Normal file
View File

@ -0,0 +1,37 @@
echo Adempiere Database Restore $Revision: 1.2 $
# $Id: DBRestore.sh,v 1.2 2005/01/22 21:59:15 jjanke Exp $
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_NAME @$ADEMPIERE_HOME/utils/CreateUser.sql $2 $3
echo -------------------------------------
echo Import ExpDat
echo -------------------------------------
imp $1@$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDat.dmp FROMUSER=($2) TOUSER=$2
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_NAME @$ADEMPIERE_HOME/utils/AfterImport.sql

View File

@ -0,0 +1,41 @@
@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.dmp (%ADEMPIERE_DB_NAME%)
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () 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_NAME% @%ADEMPIERE_HOME%\Utils\CreateUser.sql %2 %3
@echo -------------------------------------
@echo Import Adempiere.dmp
@echo -------------------------------------
@imp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Adempiere.dmp FROMUSER=(%2) TOUSER=%2
@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_NAME% @%ADEMPIERE_HOME%\Utils\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

@ -0,0 +1,36 @@
echo Adempiere Database Import $Revision: 1.2 $
# $Id: ImportAdempiere.sh,v 1.2 2005/01/22 21:59:15 jjanke Exp $
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 -------------------------------------
sqlplus $1@$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/CreateUser.sql $2 $3
echo -------------------------------------
echo Import Adempiere.dmp
echo -------------------------------------
imp $1@$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp FROMUSER=($2) TOUSER=$2
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_NAME @$ADEMPIERE_HOME/utils/AfterImport.sql

View File

@ -0,0 +1,39 @@
@Echo Adempiere Reference Database Import $Revision: 1.2 $
@Rem $Id: ImportReference.bat,v 1.2 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
@Rem Must have parameter: systemAccount
@if (%1) == () goto usage
@echo -------------------------------------
@echo Re-Create new user
@echo -------------------------------------
@sqlplus %1@%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\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_NAME% @%ADEMPIERE_HOME%\Utils\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

@ -0,0 +1,37 @@
echo Adempiere Reference Database Import $Revision: 1.2 $
# $Id: ImportReference.sh,v 1.2 2005/01/22 21:59:15 jjanke Exp $
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_NAME @$ADEMPIERE_HOME/utils/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_NAME @$ADEMPIERE_HOME/utils/AfterImport.sql

10
utils/pg/Start.bat Normal file
View File

@ -0,0 +1,10 @@
@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

8
utils/pg/Start.sh Normal file
View File

@ -0,0 +1,8 @@
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

7
utils/pg/Stop.bat Normal file
View File

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

7
utils/pg/Stop.sh Normal file
View File

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

5
utils/pg/Test.sql Normal file
View File

@ -0,0 +1,5 @@
-- Connection Test
SELECT 'Success ' AS Connection FROM DUAL
/
EXIT

View File

@ -0,0 +1,9 @@
#
cd /home/adempiere/Adempiere/utils
rm nohup.out
nohup ./RUN_Server2.sh &
echo After the server started enter: Ctrl-Z
echo Followed by the shell command: bg
echo Waiting ....
sleep 5
tail -f nohup.out

View File

@ -0,0 +1,2 @@
# Stop Adempiere
/home/adempiere/Adempiere/utils/RUN_Server2Stop.sh

View File

@ -0,0 +1,3 @@
Please find a few scripts to start the adempiere server in background.
If you have a better one or suggestions for improvement,
please file a support request!

137
utils/unix/serverStart.sh Normal file
View File

@ -0,0 +1,137 @@
#!/bin/bash
#
# FileName: adempiere.init
# Description: adempiere erp software startup and shutdown
# Vendor: K.K. Alice
# Created: 05. April 2004
# Author: S. Christians
#
# FileTarget: /etc/init.d/adempiere
# FileOwner: root.root
# FilePerms: 0755
#
# chkconfig: 2345 97 06
# $Id: serverStart.sh,v 1.2 2004/05/09 04:53:29 jjanke Exp $
# initialization
# adjust these variables to your environment
EXECDIR=/opt/adempiere/Adempiere
ENVFILE=/opt/adempiere/.bash_profile
. /etc/rc.d/init.d/functions
RETVAL=0
ADEMPIERESTATUS=
getadempierestatus() {
ADEMPIERESTATUSSTRING=$(ps -ax | grep -v grep | grep $EXECDIR)
echo $ADEMPIERESTATUSSTRING | grep $EXECDIR &> /dev/null
ADEMPIERESTATUS=$?
}
start () {
getadempierestatus
if [ $ADEMPIERESTATUS -eq 0 ] ; then
echo "adempiere is already running"
return 1
fi
echo -n "Starting Adempiere ERP: "
source $ENVFILE
# we need to stay root for logging
# (adempiere user has no write access to /var/log/...)
su -c "cd $EXECDIR/utils;$EXECDIR/utils/RUN_Server2.sh &> /var/log/adempiere.log &"
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
# wait for server to be confirmed as started in logfile
STATUSTEST=0
while [ $STATUSTEST -eq 0 ] ; do
tail -n 1 /var/log/adempiere.log | grep 'INFO.*\[Server\].*Started in' &> /dev/null && STATUSTEST=1
done
# avoid race conditions
sleep 5
echo_success
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
su -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
while [ $STATUSTEST -eq 0 ] ; do
tail -n 1 /var/log/adempiere.log | grep 'Halting VM' &> /dev/null && STATUSTEST=1
done
# avoid race conditions
sleep 5
echo_success
echo
else
echo_failure
echo
fi
return $RETVAL
}
restart () {
stop
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

@ -0,0 +1,19 @@
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 decalres 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.

Binary file not shown.

View File

@ -0,0 +1,7 @@
@echo off
REM $Id: Windows_Service_Install.bat,v 1.2 2003/11/01 20:55:15 comdivisionys Exp $
if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
%ADEMPIERE_HOME%\utils\windows\JavaService.exe -install Adempiere %JAVA_HOME%\jre\bin\server\jvm.dll -Xmx256M -Djava.class.path=%JAVA_HOME%\lib\tools.jar;%ADEMPIERE_HOME%\jboss\bin\run.jar -server %ADEMPIERE_JAVA_OPTIONS% -Djetty.port=%ADEMPIERE_WEB_PORT% -Djetty.ssl=%ADEMPIERE_SSL_PORT% -Djetty.keystore=%ADEMPIERE_KEYSTORE% -Djetty.password=%ADEMPIERE_KEYSTORE_PASSWORD% -start org.jboss.Main -params -c adempiere -stop org.jboss.Main -method systemExit -out %ADEMPIERE_HOME%\jboss\bin\out.txt -current %ADEMPIERE_HOME%\jboss\bin

View File

@ -0,0 +1,8 @@
@echo off
REM $Id: Windows_Service_Uninstall.bat,v 1.1 2003/11/01 17:42:47 comdivisionys Exp $
if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server)
NET STOP Adempiere
%ADEMPIERE_HOME%\utils\windows\JavaService.exe -uninstall Adempiere

View File

@ -0,0 +1,6 @@
Please find a suggestion on how to start the adempiere server in background
(as a windows service)
If you have a better one or suggestions for improvement,
please file a support request!
NOTE: When starting the server with this utility, the dispaly of 8/16 bit character sets might not be correct. Works fine if started via bat file.

View File

@ -0,0 +1,9 @@
Homepage: http://www.alexandriasc.com/software/JavaService/index.html
Copyright (c) 2000, Alexandria Software Consulting
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer.
Neither name of Alexandria Software Consulting nor the names of the contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.