diff --git a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java index 664fd384e9f46ba9d057b2b32ab67a850424c80b..228ef274a8ad4f99769e488a7e7d73f77c463cb9 100644 --- a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java +++ b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java @@ -41,10 +41,17 @@ class LoadClientAppsJob extends JobImpl { int i = 0; while (true) { String className = clientApps.getProperty("clientApp."+i+".main"); + if (className == null) + break; String clientName = clientApps.getProperty("clientApp."+i+".name"); String args = clientApps.getProperty("clientApp."+i+".args"); String delayStr = clientApps.getProperty("clientApp." + i + ".delay"); String onBoot = clientApps.getProperty("clientApp." + i + ".onBoot"); + String disabled = clientApps.getProperty("clientApp." + i + ".startOnLoad"); + i++; + if (disabled != null && "false".equals(disabled)) + continue; + boolean onStartup = false; if (onBoot != null) onStartup = "true".equals(onBoot) || "yes".equals(onBoot); @@ -53,9 +60,6 @@ class LoadClientAppsJob extends JobImpl { if (delayStr != null) try { delay = 1000*Integer.parseInt(delayStr); } catch (NumberFormatException nfe) {} - if (className == null) - break; - String argVal[] = parseArgs(args); if (onStartup) { // run this guy now @@ -64,7 +68,6 @@ class LoadClientAppsJob extends JobImpl { // wait before firing it up getContext().jobQueue().addJob(new DelayedRunClient(getContext(), className, clientName, argVal, delay)); } - i++; } }