aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 9f95e01..2ca3f46 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -64,6 +64,8 @@ namespace OpenSim
64 64
65 protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll"; 65 protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll";
66 66
67 protected string m_startupCommandsFile = "";
68
67 protected List<UDPServer> m_udpServers = new List<UDPServer>(); 69 protected List<UDPServer> m_udpServers = new List<UDPServer>();
68 protected List<RegionInfo> m_regionData = new List<RegionInfo>(); 70 protected List<RegionInfo> m_regionData = new List<RegionInfo>();
69 protected List<Scene> m_localScenes = new List<Scene>(); 71 protected List<Scene> m_localScenes = new List<Scene>();
@@ -105,6 +107,8 @@ namespace OpenSim
105 107
106 m_storageDLL = configSource.Configs["Startup"].GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"); 108 m_storageDLL = configSource.Configs["Startup"].GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll");
107 109
110 m_startupCommandsFile = configSource.Configs["Startup"].GetString("startup_console_commands_file", "");
111
108 standaloneAuthenticate = configSource.Configs["Startup"].GetBoolean("standalone_authenticate", false); 112 standaloneAuthenticate = configSource.Configs["Startup"].GetBoolean("standalone_authenticate", false);
109 welcomeMessage = configSource.Configs["Startup"].GetString("standalone_welcome", "Welcome to OpenSim"); 113 welcomeMessage = configSource.Configs["Startup"].GetString("standalone_welcome", "Welcome to OpenSim");
110 } 114 }
@@ -184,6 +188,33 @@ namespace OpenSim
184 { 188 {
185 this.m_udpServers[i].ServerListener(); 189 this.m_udpServers[i].ServerListener();
186 } 190 }
191
192 //Run Startup Commands
193 if (m_startupCommandsFile != "")
194 {
195 MainLog.Instance.Verbose("Running startup command script (" + m_startupCommandsFile + ")");
196 if (File.Exists(m_startupCommandsFile))
197 {
198 StreamReader readFile = File.OpenText(m_startupCommandsFile);
199 string currentCommand = "";
200 while ((currentCommand = readFile.ReadLine()) != null)
201 {
202 if (currentCommand != "")
203 {
204 MainLog.Instance.Verbose("Running '" + currentCommand + "'");
205 MainLog.Instance.MainLogRunCommand(currentCommand);
206 }
207 }
208 }
209 else
210 {
211 MainLog.Instance.Error("Startup command script missing. Will not run startup commands");
212 }
213 }
214 else
215 {
216 MainLog.Instance.Verbose("No startup command script specified. Moving on...");
217 }
187 } 218 }
188 219
189 private static void CreateDefaultRegionInfoXml(string fileName) 220 private static void CreateDefaultRegionInfoXml(string fileName)