I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 28786288 authored by kytv's avatar kytv
Browse files

runplain.sh improvements

parent f25d2a3d
No related branches found
No related tags found
No related merge requests found
......@@ -147,7 +147,7 @@ Debian wrapper.config to try to prevent confusion.
if [ -n "$FIXED_COMMAND" ]
then
COMMAND="$FIXED_COMMAND"
@@ -1055,7 +979,6 @@
@@ -1058,7 +982,6 @@
if [ "X$pid" = "X" ]
then
eval echo " `gettext 'WARNING: $APP_LONG_NAME may have failed to start.'`"
......@@ -155,7 +155,7 @@ Debian wrapper.config to try to prevent confusion.
else
eval echo ' running: PID:$pid'
fi
@@ -1858,7 +1781,7 @@
@@ -1861,7 +1784,7 @@
}
showsetusermesg() {
......@@ -164,7 +164,7 @@ Debian wrapper.config to try to prevent confusion.
}
checkifstartingasroot() {
@@ -1866,7 +1789,7 @@
@@ -1869,7 +1792,7 @@
echo "`gettext 'Running I2P as the root user is *not* recommended.'`"
showsetusermesg
echo
......@@ -173,7 +173,7 @@ Debian wrapper.config to try to prevent confusion.
exit 1
fi
}
@@ -1931,24 +1854,10 @@
@@ -1934,24 +1857,10 @@
status
;;
......@@ -214,7 +214,7 @@ Debian wrapper.config to try to prevent confusion.
+I2PTEMP="/tmp"
# Having IPv6 enabled can cause problems with certain configurations. Changing the
# next value to true may help.
# next value to true may help.
--- a/installer/resources/wrapper.config
+++ b/installer/resources/wrapper.config
@@ -8,22 +8,13 @@
......
......@@ -15,16 +15,40 @@ I2P="%INSTALL_PATH"
I2PTEMP="%SYSTEM_java_io_tmpdir"
# Having IPv6 enabled can cause problems with certain configurations. Changing the
# next value to true may help.
# next value to true may help.
PREFERv4="false"
CP=
for jars in `ls ${I2P}/lib/*.jar`; do CP=${CP}:${jars}; done
JAVA=java
# Try using the Java binary that I2P was installed with.
# If it's not found, try looking in the system PATH.
JAVA=$(which %JAVA_HOME/bin/java || which java)
if [ "`uname -s`" = "Darwin" ]; then
if [ -z $JAVA ] || [ ! -x $JAVA ]; then
echo "Error: Cannot find java." >&2
exit 1
fi
for jar in `ls ${I2P}/lib/*.jar`; do
if [ ! -z $CP ]; then
CP=${CP}:${jar};
else
CP=${jar}
fi
done
if [ $(uname -s) = "Darwin" ]; then
export JAVA_TOOL_OPTIONS="-Djava.awt.headless=true"
fi
JAVAOPTS="-Djava.net.preferIPv4Stack=${PREFERv4} -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"
(
nohup ${JAVA} -cp \"${CP}\" ${JAVAOPTS} net.i2p.router.RouterLaunch > /dev/null 2>&1
) &
PID=$!
if [ ! -z $PID ] && kill -0 $PID > /dev/null 2>&1 ; then
echo "I2P started [$PID]" >&2
echo $PID > "${I2PTEMP}/router.pid"
else
echo "I2P failed to start." >&2
exit 1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment