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

Skip to content
Snippets Groups Projects
Commit f912b011 authored by zzz's avatar zzz
Browse files

Fix console getting disabled when saving client config (ticket #1260)

Router: Add warning at startup if console is disabled
parent b0db4e4f
No related branches found
No related tags found
No related merge requests found
......@@ -183,7 +183,7 @@ public class ConfigClientsHandler extends FormHandler {
for (int cur = 0; cur < clients.size(); cur++) {
ClientAppConfig ca = clients.get(cur);
Object val = _settings.get(cur + ".enabled");
if (! ("webConsole".equals(ca.clientName) || "Web console".equals(ca.clientName)))
if (! (RouterConsoleRunner.class.getName().equals(ca.className)))
ca.disabled = val == null;
// edit of an existing entry
String desc = getJettyString("desc" + cur);
......
......@@ -38,14 +38,23 @@ public class LoadClientAppsJob extends JobImpl {
}
List<ClientAppConfig> apps = ClientAppConfig.getClientApps(getContext());
if (apps.isEmpty()) {
_log.error("Warning - No client apps or router console configured - we are just a router");
_log.logAlways(Log.WARN, "Warning - No client apps or router console configured - we are just a router");
System.err.println("Warning - No client apps or router console configured - we are just a router");
return;
}
for(int i = 0; i < apps.size(); i++) {
ClientAppConfig app = (ClientAppConfig) apps.get(i);
if (app.disabled)
if (app.disabled) {
if ("net.i2p.router.web.RouterConsoleRunner".equals(app.className)) {
String s = "Warning - Router console is disabled. To enable,\n edit the file " +
ClientAppConfig.configFile(getContext()) +
",\n change the line \"clientApp." + i + ".startOnLoad=false\"" +
" to \"clientApp." + i + ".startOnLoad=true\",\n and restart.";
_log.logAlways(Log.WARN, s);
System.err.println(s);
}
continue;
}
String argVal[] = parseArgs(app.args);
if (app.delay <= 0) {
// run this guy now
......
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