* i2prouter:

- Don't cd to script location, no longer required
    * RouterLaunch:
      - If no wrapper, put wrapper.log in system temp dir
        unless specified with -Dwrapper.logfile=/path/to/wrapper.log
        or it already exists in CWD (for backward compatibility)
      - Append rather than replace wrapper.log
      - Pass wrapper log location to router as a property, so that logs.jsp can find it
    * logs.jsp:
      - Get wrapper log location from a property too
    * runplain.sh:
      - Add path substitution to runplain.sh on install
      - Pass I2P base dir to the router as a property
    * wrapper.config:
      - Put wrapper.log in system temp dir for new installs
      - Pass I2P base dir to the router as a property
    * WorkingDir:
      - Don't migrate an existing install by default
      - Never migrate the data (too hard)
This commit is contained in:
zzz
2009-06-13 21:04:27 +00:00
parent 718375419e
commit 24daf00616
7 changed files with 94 additions and 64 deletions

View File

@ -109,6 +109,7 @@
<parsable targetfile="$INSTALL_PATH/wrapper.config" type="javaprop" />
<parsable targetfile="$INSTALL_PATH/i2prouter" type="shell" os="unix|mac" />
<parsable targetfile="$INSTALL_PATH/eepget" type="shell" os="unix|mac" />
<parsable targetfile="$INSTALL_PATH/runplain.sh" type="shell" os="unix|mac" />
<!-- postinstall stuff for windows -->
<executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />

View File

@ -8,28 +8,31 @@
# 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
# Paths
# 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.
I2P="%INSTALL_PATH"
I2PTEMP="%SYSTEM_java_io_tmpdir"
# Application
APP_NAME="i2p"
APP_LONG_NAME="I2P Service"
# Wrapper
WRAPPER_CMD="%INSTALL_PATH/i2psvc"
WRAPPER_CONF="%INSTALL_PATH/wrapper.config"
WRAPPER_CMD="$I2P/i2psvc"
WRAPPER_CONF="$I2P/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="%SYSTEM_java_io_tmpdir"
PIDDIR="$I2PTEMP"
# 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
@ -51,40 +54,6 @@ PIDDIR="%SYSTEM_java_io_tmpdir"
# Do not modify anything beyond this point
#-----------------------------------------------------------------------------
# Get the fully qualified path to the script
case $0 in
/*)
SCRIPT="$0"
;;
*)
PWD=`pwd`
SCRIPT="$PWD/$0"
;;
esac
# Change spaces to ":" so the tokens can be parsed.
SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'`
# Get the real path to this script, resolving any symbolic links
TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'`
REALPATH=
for C in $TOKENS; do
REALPATH="$REALPATH/$C"
while [ -h "$REALPATH" ] ; do
LS="`ls -ld "$REALPATH"`"
LINK="`expr "$LS" : '.*-> \(.*\)$'`"
if expr "$LINK" : '/.*' > /dev/null; then
REALPATH="$LINK"
else
REALPATH="`dirname "$REALPATH"`""/$LINK"
fi
done
done
# Change ":" chars back to spaces.
REALPATH=`echo $REALPATH | sed -e 's;:; ;g'`
# Change the current directory to the location of the script
cd "`dirname "$REALPATH"`"
# Process ID
ANCHORFILE="$PIDDIR/$APP_NAME.anchor"
PIDFILE="$PIDDIR/$APP_NAME.pid"

View File

@ -5,9 +5,17 @@
# probably not enough for i2p.
# You should really use the i2prouter script instead.
#
export CP=. ; for j in lib/* ; do export CP=$CP:$j ; done;
# Paths
# 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.
I2P="%INSTALL_PATH"
I2PTEMP="%SYSTEM_java_io_tmpdir"
export CP="$I2P" ; for j in "$I2P/lib/*" ; do export CP="$CP:$j" ; done;
JAVA=java
JAVAOPTS="-Djava.library.path=.:lib -DloggerFilenameOverride=logs/log-router-@.txt"
nohup $JAVA -cp $CP $JAVAOPTS net.i2p.router.RouterLaunch > /dev/null 2>&1 &
echo $! > router.pid
JAVAOPTS="-Djava.library.path=$I2P:$I2P/lib -Di2p.dir.base=$I2P -DloggerFilenameOverride=logs/log-router-@.txt"
nohup $JAVA -cp "$CP" $JAVAOPTS net.i2p.router.RouterLaunch > /dev/null 2>&1 &
echo $! > "$I2PTEMP/router.pid"

View File

@ -51,11 +51,12 @@ wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt
wrapper.java.additional.2=-Dorg.mortbay.http.Version.paranoid=true
wrapper.java.additional.3=-Dorg.mortbay.util.FileResource.checkAliases=false
wrapper.java.additional.4=-Dorg.mortbay.xml.XmlParser.NotValidating=true
wrapper.java.additional.5=-Di2p.dir.base=$INSTALL_PATH
# Uncomment this for better performance.
# If it doesn't work, server mode is not available in your JVM.
# This may not be required if your machine is already "server-class".
# See http://java.sun.com/j2se/1.5.0/docs/guide/vm/server-class.html
#wrapper.java.additional.5=-server
#wrapper.java.additional.6=-server
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=4
@ -86,7 +87,13 @@ wrapper.console.format=PM
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
wrapper.logfile=wrapper.log
# You may wish to change this on linux so the log is
# preserved across OS restarts.
# If you do change it, add the following line above to
# tell the router where to find the wrapper log
# (change X to the next available number)
# wrapper.java.additional.X=-Dwrapper.logfile=/path/to/wrapper.log
wrapper.logfile=$SYSTEM_java_io_tmpdir/wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM