aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorCharles Krinke2007-10-18 02:13:06 +0000
committerCharles Krinke2007-10-18 02:13:06 +0000
commit884edac78e67a4f2d3552810ea7a00d608120559 (patch)
tree9899c4f05833ed6a9163958484938b405f886cf9 /OpenSim/Region/Application
parentAdd "force-update", "command-script" & "show modules" to console help. (diff)
downloadopensim-SC_OLD-884edac78e67a4f2d3552810ea7a00d608120559.zip
opensim-SC_OLD-884edac78e67a4f2d3552810ea7a00d608120559.tar.gz
opensim-SC_OLD-884edac78e67a4f2d3552810ea7a00d608120559.tar.bz2
opensim-SC_OLD-884edac78e67a4f2d3552810ea7a00d608120559.tar.xz
Add gryc's patch to run commands in a shutdown_commands.txt file when the sim is shutdown. A config setting has also been added to OpenSim.ini. Thank you very much, gryc.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 01bee37..ca72d62 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -68,6 +68,7 @@ namespace OpenSim
68 protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll"; 68 protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll";
69 69
70 protected string m_startupCommandsFile = ""; 70 protected string m_startupCommandsFile = "";
71 protected string m_shutdownCommandsFile = "";
71 72
72 protected List<UDPServer> m_udpServers = new List<UDPServer>(); 73 protected List<UDPServer> m_udpServers = new List<UDPServer>();
73 protected List<RegionInfo> m_regionData = new List<RegionInfo>(); 74 protected List<RegionInfo> m_regionData = new List<RegionInfo>();
@@ -119,6 +120,7 @@ namespace OpenSim
119 m_storageDLL = configSource.Configs["Startup"].GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"); 120 m_storageDLL = configSource.Configs["Startup"].GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll");
120 121
121 m_startupCommandsFile = configSource.Configs["Startup"].GetString("startup_console_commands_file", ""); 122 m_startupCommandsFile = configSource.Configs["Startup"].GetString("startup_console_commands_file", "");
123 m_shutdownCommandsFile = configSource.Configs["Startup"].GetString("shutdown_console_commands_file", "");
122 124
123 m_scriptEngine = configSource.Configs["Startup"].GetString("script_engine", "DotNetEngine"); 125 m_scriptEngine = configSource.Configs["Startup"].GetString("script_engine", "DotNetEngine");
124 126
@@ -343,6 +345,11 @@ namespace OpenSim
343 /// </summary> 345 /// </summary>
344 public virtual void Shutdown() 346 public virtual void Shutdown()
345 { 347 {
348 if (m_startupCommandsFile != "")
349 {
350 RunCommandScript(m_shutdownCommandsFile);
351 }
352
346 m_log.Verbose("Closing all threads"); 353 m_log.Verbose("Closing all threads");
347 m_log.Verbose("Killing listener thread"); 354 m_log.Verbose("Killing listener thread");
348 m_log.Verbose("Killing clients"); 355 m_log.Verbose("Killing clients");