mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Add the ability to use -console=rest to the region server. User
and pass are specified the same way as for the ROBUST server
This commit is contained in:
@@ -120,6 +120,7 @@ namespace OpenSim
|
||||
configSource.AddSwitch("Startup", "gridmode");
|
||||
configSource.AddSwitch("Startup", "physics");
|
||||
configSource.AddSwitch("Startup", "gui");
|
||||
configSource.AddSwitch("Startup", "console");
|
||||
|
||||
configSource.AddConfig("StandAlone");
|
||||
configSource.AddConfig("Network");
|
||||
@@ -223,4 +224,4 @@ namespace OpenSim
|
||||
_IsHandlingException = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace OpenSim
|
||||
protected string m_startupCommandsFile;
|
||||
protected string m_shutdownCommandsFile;
|
||||
protected bool m_gui = false;
|
||||
protected string m_consoleType = "local";
|
||||
|
||||
private string m_timedScript = "disabled";
|
||||
private Timer m_scriptTimer;
|
||||
@@ -71,7 +72,10 @@ namespace OpenSim
|
||||
m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", "startup_commands.txt");
|
||||
m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", "shutdown_commands.txt");
|
||||
|
||||
m_gui = startupConfig.GetBoolean("gui", false);
|
||||
if (startupConfig.GetString("console", String.Empty) == String.Empty)
|
||||
m_gui = startupConfig.GetBoolean("gui", false);
|
||||
else
|
||||
m_consoleType= startupConfig.GetString("console", String.Empty);
|
||||
|
||||
m_timedScript = startupConfig.GetString("timer_Script", "disabled");
|
||||
if (m_logFileAppender != null)
|
||||
@@ -110,13 +114,31 @@ namespace OpenSim
|
||||
if (m_gui) // Driven by external GUI
|
||||
m_console = new CommandConsole("Region");
|
||||
else
|
||||
m_console = new LocalConsole("Region");
|
||||
{
|
||||
switch (m_consoleType)
|
||||
{
|
||||
case "basic":
|
||||
m_console = new CommandConsole("Region");
|
||||
break;
|
||||
case "rest":
|
||||
m_console = new RemoteConsole("Region");
|
||||
((RemoteConsole)m_console).ReadConfig(m_config.Source);
|
||||
break;
|
||||
default:
|
||||
m_console = new LocalConsole("Region");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MainConsole.Instance = m_console;
|
||||
|
||||
RegisterConsoleCommands();
|
||||
|
||||
base.StartupSpecific();
|
||||
|
||||
if (m_console is RemoteConsole)
|
||||
((RemoteConsole)m_console).SetServer(m_httpServer);
|
||||
|
||||
//Run Startup Commands
|
||||
if (String.IsNullOrEmpty(m_startupCommandsFile))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user