That didn't quite work. Trying this instead -- prompt given in the cmd line.
parent
71c8346f78
commit
b43fc318fb
|
@ -79,6 +79,7 @@ namespace OpenSim.Server.Base
|
||||||
argvConfig.AddSwitch("Startup", "console", "c");
|
argvConfig.AddSwitch("Startup", "console", "c");
|
||||||
argvConfig.AddSwitch("Startup", "logfile", "l");
|
argvConfig.AddSwitch("Startup", "logfile", "l");
|
||||||
argvConfig.AddSwitch("Startup", "inifile", "i");
|
argvConfig.AddSwitch("Startup", "inifile", "i");
|
||||||
|
argvConfig.AddSwitch("Startup", "prompt", "p");
|
||||||
|
|
||||||
// Automagically create the ini file name
|
// Automagically create the ini file name
|
||||||
//
|
//
|
||||||
|
@ -87,11 +88,16 @@ namespace OpenSim.Server.Base
|
||||||
|
|
||||||
string iniFile = assemblyName.Name + ".ini";
|
string iniFile = assemblyName.Name + ".ini";
|
||||||
|
|
||||||
// Check if a file name was given on the command line
|
|
||||||
//
|
|
||||||
IConfig startupConfig = argvConfig.Configs["Startup"];
|
IConfig startupConfig = argvConfig.Configs["Startup"];
|
||||||
if (startupConfig != null)
|
if (startupConfig != null)
|
||||||
|
{
|
||||||
|
// Check if a file name was given on the command line
|
||||||
|
//
|
||||||
iniFile = startupConfig.GetString("inifile", iniFile);
|
iniFile = startupConfig.GetString("inifile", iniFile);
|
||||||
|
//
|
||||||
|
// Check if a prompt was given on the command line
|
||||||
|
prompt = startupConfig.GetString("prompt", prompt);
|
||||||
|
}
|
||||||
|
|
||||||
// Find out of the file name is a URI and remote load it
|
// Find out of the file name is a URI and remote load it
|
||||||
// if it's possible. Load it as a local file otherwise.
|
// if it's possible. Load it as a local file otherwise.
|
||||||
|
|
|
@ -49,6 +49,8 @@ namespace OpenSim.Server
|
||||||
|
|
||||||
static int Main(string[] args)
|
static int Main(string[] args)
|
||||||
{
|
{
|
||||||
|
m_Server = new HttpServerBase("Server", args);
|
||||||
|
|
||||||
IConfig serverConfig = m_Server.Config.Configs["Startup"];
|
IConfig serverConfig = m_Server.Config.Configs["Startup"];
|
||||||
if (serverConfig == null)
|
if (serverConfig == null)
|
||||||
{
|
{
|
||||||
|
@ -56,10 +58,6 @@ namespace OpenSim.Server
|
||||||
throw new Exception("Configuration error");
|
throw new Exception("Configuration error");
|
||||||
}
|
}
|
||||||
|
|
||||||
string prompt = serverConfig.GetString("Prompt", "Server");
|
|
||||||
|
|
||||||
m_Server = new HttpServerBase(prompt, args);
|
|
||||||
|
|
||||||
string connList = serverConfig.GetString("ServiceConnectors", String.Empty);
|
string connList = serverConfig.GetString("ServiceConnectors", String.Empty);
|
||||||
string[] conns = connList.Split(new char[] {',', ' '});
|
string[] conns = connList.Split(new char[] {',', ' '});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue