* Client Apps: Add new parameter for clients.config,
clientApp.x.startOnLoad=false, to disable loading (for SAM for example). Defaults to true of course.
This commit is contained in:
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user