Skip to content

Commit

Permalink
change value of localhost in all config files before running the rout…
Browse files Browse the repository at this point in the history
…er, don't check the network prefix, just use dockerenv
  • Loading branch information
eyedeekay committed Nov 13, 2022
1 parent c190acc commit 3c25e1f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docker/rootfs/startapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ if [ -f /.dockerenv ]; then
echo "[startapp] Running in container"
if [ -z "$IP_ADDR" ]; then
export IP_ADDR=$(hostname -i)
if echo "$IP_ADDR" | grep "172."; then
echo "[startapp] Running in docker network"
fi
echo "[startapp] Running in docker network"
fi
sed -i "s/127.0.0.1/$IP_ADDR/g" ./clients.config ./i2ptunnel.config
echo "[startapp] setting reachable IP to container IP $IP_ADDR"
find . -name '*.config' -exec sed -i "s/127.0.0.1/$IP_ADDR/g" {} \;
find . -name '*.config' -exec sed -i "s/localhost/$IP_ADDR/g" {} \;
fi

# Options required for reflective access in dynamic JVM languages like Groovy and Jython
Expand All @@ -39,4 +39,3 @@ JAVA17OPTS="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/su
JAVAOPTS="-Djava.net.preferIPv4Stack=false -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -Di2p.dir.config=${HOME}/.i2p -DloggerFilenameOverride=logs/[email protected] -Xmx$JVM_XMX"

java -cp "${CLASSPATH}" ${JAVA_OPTS} net.i2p.router.RouterLaunch

0 comments on commit 3c25e1f

Please sign in to comment.