From 884edac78e67a4f2d3552810ea7a00d608120559 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Thu, 18 Oct 2007 02:13:06 +0000 Subject: 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. --- OpenSim/Region/Application/OpenSimMain.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/Application/OpenSimMain.cs') 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 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"); -- cgit v1.1