SSL Wizard: Stop and restart Jetty if running

Make JettyStart restartable
RouterAppManager workaround for JettyStart becoming untracked after stop
This commit is contained in:
zzz
2018-05-03 19:29:13 +00:00
parent 9a7b58259f
commit b31ebfe368
3 changed files with 78 additions and 2 deletions

View File

@@ -76,6 +76,26 @@ public class RouterAppManager extends ClientAppManagerImpl {
Arrays.equals(e.getValue(), args))
return e.getKey();
}
// workaround for Jetty stop and restart from i2ptunnel
// app becomes untracked so look in registered
if (className.equals("net.i2p.jetty.JettyStart") && args.length > 0) {
for (ClientApp app : _registered.values()) {
if (app.getClass().getName().equals(className)) {
String dname = app.getDisplayName();
int idx = 0;
boolean match = true;
for (String arg : args) {
idx = dname.indexOf(arg, idx);
if (idx < 0) {
match = false;
break;
}
}
if (match)
return app;
}
}
}
return null;
}