diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 01bee37caf..ca72d62a0d 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -68,6 +68,7 @@ namespace OpenSim protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll"; protected string m_startupCommandsFile = ""; + protected string m_shutdownCommandsFile = ""; protected List m_udpServers = new List(); protected List m_regionData = new List(); @@ -119,6 +120,7 @@ namespace OpenSim m_storageDLL = configSource.Configs["Startup"].GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"); m_startupCommandsFile = configSource.Configs["Startup"].GetString("startup_console_commands_file", ""); + m_shutdownCommandsFile = configSource.Configs["Startup"].GetString("shutdown_console_commands_file", ""); m_scriptEngine = configSource.Configs["Startup"].GetString("script_engine", "DotNetEngine"); @@ -343,6 +345,11 @@ namespace OpenSim /// public virtual void Shutdown() { + if (m_startupCommandsFile != "") + { + RunCommandScript(m_shutdownCommandsFile); + } + m_log.Verbose("Closing all threads"); m_log.Verbose("Killing listener thread"); m_log.Verbose("Killing clients"); diff --git a/bin/OpenSim.ini b/bin/OpenSim.ini index f4efeb5469..118c26163c 100644 --- a/bin/OpenSim.ini +++ b/bin/OpenSim.ini @@ -7,6 +7,7 @@ physics = basicphysics storage_plugin = "OpenSim.DataStore.MonoSqlite.dll" ;storage_plugin = "OpenSim.DataStore.NullStorage.dll" startup_console_commands_file = "startup_commands.txt" +shutdown_console_commands_file = "shutdown_commands.txt" serverside_object_permissions = false ; asset_database = "db4o" @@ -38,3 +39,4 @@ user_recv_key = "null" asset_server_url = "http://127.0.0.1:8003" + diff --git a/bin/shutdown_commands.txt b/bin/shutdown_commands.txt new file mode 100644 index 0000000000..5ec28f0450 --- /dev/null +++ b/bin/shutdown_commands.txt @@ -0,0 +1 @@ +backup