diff options
author | Charles Krinke | 2007-10-18 02:13:06 +0000 |
---|---|---|
committer | Charles Krinke | 2007-10-18 02:13:06 +0000 |
commit | 884edac78e67a4f2d3552810ea7a00d608120559 (patch) | |
tree | 9899c4f05833ed6a9163958484938b405f886cf9 | |
parent | Add "force-update", "command-script" & "show modules" to console help. (diff) | |
download | opensim-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.
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 7 | ||||
-rw-r--r-- | bin/OpenSim.ini | 2 | ||||
-rw-r--r-- | bin/shutdown_commands.txt | 1 |
3 files changed, 10 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"); |
diff --git a/bin/OpenSim.ini b/bin/OpenSim.ini index f4efeb5..118c261 100644 --- a/bin/OpenSim.ini +++ b/bin/OpenSim.ini | |||
@@ -7,6 +7,7 @@ physics = basicphysics | |||
7 | storage_plugin = "OpenSim.DataStore.MonoSqlite.dll" | 7 | storage_plugin = "OpenSim.DataStore.MonoSqlite.dll" |
8 | ;storage_plugin = "OpenSim.DataStore.NullStorage.dll" | 8 | ;storage_plugin = "OpenSim.DataStore.NullStorage.dll" |
9 | startup_console_commands_file = "startup_commands.txt" | 9 | startup_console_commands_file = "startup_commands.txt" |
10 | shutdown_console_commands_file = "shutdown_commands.txt" | ||
10 | serverside_object_permissions = false | 11 | serverside_object_permissions = false |
11 | 12 | ||
12 | ; asset_database = "db4o" | 13 | ; asset_database = "db4o" |
@@ -38,3 +39,4 @@ user_recv_key = "null" | |||
38 | 39 | ||
39 | asset_server_url = "http://127.0.0.1:8003" | 40 | asset_server_url = "http://127.0.0.1:8003" |
40 | 41 | ||
42 | |||
diff --git a/bin/shutdown_commands.txt b/bin/shutdown_commands.txt new file mode 100644 index 0000000..5ec28f0 --- /dev/null +++ b/bin/shutdown_commands.txt | |||
@@ -0,0 +1 @@ | |||
backup | |||