From daf078d4d75ecad00d847b761860b45c683c4e96 Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 12 Jun 2009 12:23:25 +0000 Subject: [PATCH] * Installer: - Add install and temp path substitution to wrapper.config and i2prouter on install --- installer/install.xml | 7 +++++++ installer/resources/i2prouter | 10 +++++++--- installer/resources/wrapper.config | 21 ++++++++++++++++----- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/installer/install.xml b/installer/install.xml index 30cdd7351..d8ebb7d35 100644 --- a/installer/install.xml +++ b/installer/install.xml @@ -101,6 +101,13 @@ Base installation files + + + diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter index 0705905fe..b5c292f19 100644 --- a/installer/resources/i2prouter +++ b/installer/resources/i2prouter @@ -8,6 +8,10 @@ # if you have changed the default location set in the # wrapper configuration file. # +# Note that (percent)INSTALL_PATH and (percent)SYSTEM_java_io_tmpdir +# should have been replaced by +# the izpack installer. If you did not run the installer, +# replace them with the appropriate path. #----------------------------------------------------------------------------- # These settings can be modified to fit the needs of your application @@ -17,15 +21,15 @@ APP_NAME="i2p" APP_LONG_NAME="I2P Service" # Wrapper -WRAPPER_CMD="./i2psvc" -WRAPPER_CONF="wrapper.config" +WRAPPER_CMD="%INSTALL_PATH/i2psvc" +WRAPPER_CONF="%INSTALL_PATH/wrapper.config" # Priority at which to run the wrapper. See "man nice" for valid priorities. # nice is only used if a priority is specified. PRIORITY= # Location of the pid file. -PIDDIR="." +PIDDIR="%SYSTEM_java_io_tmpdir" # If uncommented, causes the Wrapper to be shutdown using an anchor file. # When launched with the 'start' command, it will also ignore all INT and diff --git a/installer/resources/wrapper.config b/installer/resources/wrapper.config index f46bf8d6b..b14bc8288 100644 --- a/installer/resources/wrapper.config +++ b/installer/resources/wrapper.config @@ -11,6 +11,12 @@ # with the runplain.sh script on Linux. Use the 'restartable' # icon on Windows or the i2prouter script on Linux to run the wrapper. # +# NOTE - The izpack installer performs variable subsitiution on this +# file upon installation. If you did not use izpack, you must +# find and replace all instances of (dollar)INSTALL_PATH and +# (dollar)SYSTEM_java_io_tmpdir with appropriate values +# (perhaps . and /var/tmp, respectively) +# #******************************************************************** # Java Application wrapper.java.command=java @@ -32,13 +38,13 @@ wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp # classes, or all the classes of i2p.jar, are in a different directory). # Be sure there are no other duplicate classes. # -wrapper.java.classpath.1=lib/*.jar +wrapper.java.classpath.1=$INSTALL_PATH/lib/*.jar # uncomment this to use the system classpath as well (e.g. to get tools.jar) # wrapper.java.classpath.2=%CLASSPATH% # Java Library Path (location of Wrapper.DLL or libwrapper.so) -wrapper.java.library.path.1=. -wrapper.java.library.path.2=lib +wrapper.java.library.path.1=$INSTALL_PATH +wrapper.java.library.path.2=$INSTALL_PATH/lib # Java Additional Parameters wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt @@ -131,7 +137,11 @@ wrapper.ping.timeout=605 wrapper.use_system_time=false # pid file for the JVM -wrapper.java.pidfile=routerjvm.pid +# If you plan to have multiple wrappers running on the same machine, +# you should copy this file, change the location or file name, +# and edit the i2prouter script to change the WRAPPER_CONF setting +# to point to the new wrapper.config location. +wrapper.java.pidfile=$SYSTEM_java_io_tmpdir/routerjvm.pid # pid file for the service monitoring the JVM # # From i2prouter: @@ -141,7 +151,8 @@ wrapper.java.pidfile=routerjvm.pid # PIDFILE="$PIDDIR/$APP_NAME.pid" # # This means i2prouter looks for './i2p.pid'. -wrapper.pidfile=i2p.pid +# See comments above for wrapper.java.pidfile +wrapper.pidfile=$SYSTEM_java_io_tmpdir/i2p.pid #******************************************************************** # Wrapper NT Service Properties