mirror of
https://github.com/wownero/i2p-zero.git
synced 2026-10-17 15:21:40 +02:00
Docs typo corrected. Now checking for router.isAlive() prior to starting SAMBridge.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
basedir=$(dirname $(dirname $(readlink -fm $0)))
|
||||
|
||||
# convert the jar files from an existing I2P built into modules suitable for use with jlink
|
||||
# convert the jar files from an existing I2P build into modules suitable for use with jlink
|
||||
$basedir/bin/convert-jars-to-modules.sh
|
||||
|
||||
# compile the Main class that starts the I2P router and SAM listener
|
||||
|
||||
@@ -21,6 +21,7 @@ public class Main {
|
||||
p.put("i2p.dir.base", "/usr/share/i2p");
|
||||
// where to find the I2P data files
|
||||
p.put("i2p.dir.config", System.getProperty("user.home") + File.separator + ".i2p");
|
||||
|
||||
// bandwidth limits in K bytes per second
|
||||
p.put("i2np.inboundKBytesPerSecond","50");
|
||||
p.put("i2np.outboundKBytesPerSecond","50");
|
||||
@@ -32,7 +33,7 @@ public class Main {
|
||||
@Override
|
||||
public void run() {
|
||||
// don't call exit() when the router stops
|
||||
r.setKillVMOnEnd(false);
|
||||
r.setKillVMOnEnd(true);
|
||||
r.runRouter();
|
||||
}
|
||||
}.start();
|
||||
@@ -41,6 +42,17 @@ public class Main {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
while(true) {
|
||||
if(r.isAlive()) {
|
||||
break;
|
||||
}
|
||||
else {
|
||||
Thread.sleep(1000);
|
||||
System.out.println("Waiting for I2P router to start...");
|
||||
}
|
||||
}
|
||||
|
||||
String[] args = new String[]{"sam.keys", "127.0.0.1", "7656", "i2cp.tcp.host=127.0.0.1", "i2cp.tcp.port=7654"};
|
||||
I2PAppContext context = r.getContext();
|
||||
ClientAppManager mgr = new ClientAppManagerImpl(context);
|
||||
|
||||
Reference in New Issue
Block a user