From 250fb6f5dbcd6665c2783db08389b7e5ce698d5e Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 7 May 2008 16:24:15 +0000
Subject: * Move shutdown processing to base OpenSimServer, overriding the
method where appropriate * This also means that the command quit (as well as
shutdown) will now close down grid servers (instead of only being in place
for the region server)
---
OpenSim/Framework/Servers/BaseOpenSimServer.cs | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index c243042..2069c0e 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -47,7 +47,16 @@ namespace OpenSim.Framework.Servers
public BaseOpenSimServer()
{
m_startuptime = DateTime.Now;
- }
+ }
+
+ ///
+ /// Should be overriden by descendents if they need to perform extra shutdown processing
+ ///
+ protected virtual void Shutdown()
+ {
+ m_console.Close();
+ Environment.Exit(0);
+ }
///
/// Runs commands issued by the server console from the operator
@@ -59,7 +68,9 @@ namespace OpenSim.Framework.Servers
switch (command)
{
case "help":
+ m_console.Notice("quit - equivalent to shutdown.");
m_console.Notice("show uptime - show server startup and uptime.");
+ m_console.Notice("shutdown - shutdown the server.\n");
break;
case "show":
@@ -68,6 +79,11 @@ namespace OpenSim.Framework.Servers
Show(cmdparams[0]);
}
break;
+
+ case "quit":
+ case "shutdown":
+ Shutdown();
+ break;
}
}
--
cgit v1.1