Add -xmlfile= option to UGM, to let the files be outside bin if desired

This commit is contained in:
Melanie
2009-08-21 11:35:40 +01:00
parent 158ad39df0
commit 7daf6dbbd3
4 changed files with 11 additions and 3 deletions

View File

@@ -76,16 +76,19 @@ namespace OpenSim.Grid.UserServer
protected static string m_consoleType = "local";
protected static IConfigSource m_config = null;
protected static string m_configFile = "UserServer_Config.xml";
public static void Main(string[] args)
{
ArgvConfigSource argvSource = new ArgvConfigSource(args);
argvSource.AddSwitch("Startup", "console", "c");
argvSource.AddSwitch("Startup", "xmlfile", "x");
IConfig startupConfig = argvSource.Configs["Startup"];
if (startupConfig != null)
{
m_consoleType = startupConfig.GetString("console", "local");
m_configFile = startupConfig.GetString("xmlfile", "UserServer_Config.xml");
}
m_config = argvSource;
@@ -151,7 +154,7 @@ namespace OpenSim.Grid.UserServer
protected virtual IInterServiceInventoryServices StartupCoreComponents()
{
Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml")));
Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), m_configFile)));
m_httpServer = new BaseHttpServer(Cfg.HttpPort);