diff options
author | gareth | 2007-05-14 01:50:13 +0000 |
---|---|---|
committer | gareth | 2007-05-14 01:50:13 +0000 |
commit | 5ba3fa962987b5e73757f2022964104748c38e19 (patch) | |
tree | 1afcb55352c518939598d50734d489de2d9cd829 /OpenGridServices.GridServer | |
parent | Now we just need that --setup option for all the apps..... (diff) | |
download | opensim-SC-5ba3fa962987b5e73757f2022964104748c38e19.zip opensim-SC-5ba3fa962987b5e73757f2022964104748c38e19.tar.gz opensim-SC-5ba3fa962987b5e73757f2022964104748c38e19.tar.bz2 opensim-SC-5ba3fa962987b5e73757f2022964104748c38e19.tar.xz |
Added -setuponly switch to gridserver
KILLED THE GRIDSERVER'S CONSOLE VICIOUSLY AND WITHOUT MERCY!!!!
Added gridserver setup to InitSetup() in ServiceManager
Diffstat (limited to 'OpenGridServices.GridServer')
-rw-r--r-- | OpenGridServices.GridServer/Main.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenGridServices.GridServer/Main.cs b/OpenGridServices.GridServer/Main.cs index f7b0067..1a2a0fb 100644 --- a/OpenGridServices.GridServer/Main.cs +++ b/OpenGridServices.GridServer/Main.cs | |||
@@ -32,6 +32,7 @@ using System.IO; | |||
32 | using System.Text; | 32 | using System.Text; |
33 | using System.Timers; | 33 | using System.Timers; |
34 | using System.Net; | 34 | using System.Net; |
35 | using System.Threading; | ||
35 | using System.Reflection; | 36 | using System.Reflection; |
36 | using libsecondlife; | 37 | using libsecondlife; |
37 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
@@ -51,6 +52,7 @@ namespace OpenGridServices.GridServer | |||
51 | public GridConfig Cfg; | 52 | public GridConfig Cfg; |
52 | 53 | ||
53 | public static OpenGrid_Main thegrid; | 54 | public static OpenGrid_Main thegrid; |
55 | public static bool setuponly; | ||
54 | 56 | ||
55 | //public LLUUID highestUUID; | 57 | //public LLUUID highestUUID; |
56 | 58 | ||
@@ -63,7 +65,8 @@ namespace OpenGridServices.GridServer | |||
63 | [STAThread] | 65 | [STAThread] |
64 | public static void Main(string[] args) | 66 | public static void Main(string[] args) |
65 | { | 67 | { |
66 | Console.WriteLine("Starting...\n"); | 68 | if(args[0]=="-setuponly") setuponly=true; |
69 | Console.WriteLine("Starting...\n"); | ||
67 | 70 | ||
68 | thegrid = new OpenGrid_Main(); | 71 | thegrid = new OpenGrid_Main(); |
69 | thegrid.Startup(); | 72 | thegrid.Startup(); |
@@ -73,11 +76,10 @@ namespace OpenGridServices.GridServer | |||
73 | 76 | ||
74 | private void Work() | 77 | private void Work() |
75 | { | 78 | { |
76 | m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"\nEnter help for a list of commands\n"); | ||
77 | |||
78 | while (true) | 79 | while (true) |
79 | { | 80 | { |
80 | m_console.MainConsolePrompt(); | 81 | Thread.Sleep(5000); |
82 | // should flush the DB etc here | ||
81 | } | 83 | } |
82 | } | 84 | } |
83 | 85 | ||
@@ -94,6 +96,7 @@ namespace OpenGridServices.GridServer | |||
94 | m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration"); | 96 | m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration"); |
95 | Cfg = this.LoadConfigDll(this.ConfigDll); | 97 | Cfg = this.LoadConfigDll(this.ConfigDll); |
96 | Cfg.InitConfig(); | 98 | Cfg.InitConfig(); |
99 | if(setuponly) Environment.Exit(0); | ||
97 | 100 | ||
98 | m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Connecting to Storage Server"); | 101 | m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Connecting to Storage Server"); |
99 | m_gridManager = new GridManager(); | 102 | m_gridManager = new GridManager(); |
@@ -129,7 +132,7 @@ namespace OpenGridServices.GridServer | |||
129 | 132 | ||
130 | m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting sim status checker"); | 133 | m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting sim status checker"); |
131 | 134 | ||
132 | Timer simCheckTimer = new Timer( 300000 ); // 5 minutes | 135 | System.Timers.Timer simCheckTimer = new System.Timers.Timer( 300000 ); // 5 minutes |
133 | simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); | 136 | simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); |
134 | simCheckTimer.Enabled = true; | 137 | simCheckTimer.Enabled = true; |
135 | } | 138 | } |