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

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

* Client Apps: Add new parameter for clients.config,

        clientApp.x.startOnLoad=false, to disable loading
        (for SAM for example). Defaults to true of course.
parent 26bb4799
No related branches found
No related tags found
No related merge requests found
...@@ -41,10 +41,17 @@ class LoadClientAppsJob extends JobImpl { ...@@ -41,10 +41,17 @@ class LoadClientAppsJob extends JobImpl {
int i = 0; int i = 0;
while (true) { while (true) {
String className = clientApps.getProperty("clientApp."+i+".main"); String className = clientApps.getProperty("clientApp."+i+".main");
if (className == null)
break;
String clientName = clientApps.getProperty("clientApp."+i+".name"); String clientName = clientApps.getProperty("clientApp."+i+".name");
String args = clientApps.getProperty("clientApp."+i+".args"); String args = clientApps.getProperty("clientApp."+i+".args");
String delayStr = clientApps.getProperty("clientApp." + i + ".delay"); String delayStr = clientApps.getProperty("clientApp." + i + ".delay");
String onBoot = clientApps.getProperty("clientApp." + i + ".onBoot"); 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; boolean onStartup = false;
if (onBoot != null) if (onBoot != null)
onStartup = "true".equals(onBoot) || "yes".equals(onBoot); onStartup = "true".equals(onBoot) || "yes".equals(onBoot);
...@@ -53,9 +60,6 @@ class LoadClientAppsJob extends JobImpl { ...@@ -53,9 +60,6 @@ class LoadClientAppsJob extends JobImpl {
if (delayStr != null) if (delayStr != null)
try { delay = 1000*Integer.parseInt(delayStr); } catch (NumberFormatException nfe) {} try { delay = 1000*Integer.parseInt(delayStr); } catch (NumberFormatException nfe) {}
if (className == null)
break;
String argVal[] = parseArgs(args); String argVal[] = parseArgs(args);
if (onStartup) { if (onStartup) {
// run this guy now // run this guy now
...@@ -64,7 +68,6 @@ class LoadClientAppsJob extends JobImpl { ...@@ -64,7 +68,6 @@ class LoadClientAppsJob extends JobImpl {
// wait before firing it up // wait before firing it up
getContext().jobQueue().addJob(new DelayedRunClient(getContext(), className, clientName, argVal, delay)); getContext().jobQueue().addJob(new DelayedRunClient(getContext(), className, clientName, argVal, delay));
} }
i++;
} }
} }
......
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