Added -setuponly switch to gridserver
KILLED THE GRIDSERVER'S CONSOLE VICIOUSLY AND WITHOUT MERCY!!!! Added gridserver setup to InitSetup() in ServiceManagerzircon^2
parent
d95d59db3b
commit
5ba3fa9629
|
@ -32,6 +32,7 @@ using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Threading;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -51,6 +52,7 @@ namespace OpenGridServices.GridServer
|
||||||
public GridConfig Cfg;
|
public GridConfig Cfg;
|
||||||
|
|
||||||
public static OpenGrid_Main thegrid;
|
public static OpenGrid_Main thegrid;
|
||||||
|
public static bool setuponly;
|
||||||
|
|
||||||
//public LLUUID highestUUID;
|
//public LLUUID highestUUID;
|
||||||
|
|
||||||
|
@ -63,7 +65,8 @@ namespace OpenGridServices.GridServer
|
||||||
[STAThread]
|
[STAThread]
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Starting...\n");
|
if(args[0]=="-setuponly") setuponly=true;
|
||||||
|
Console.WriteLine("Starting...\n");
|
||||||
|
|
||||||
thegrid = new OpenGrid_Main();
|
thegrid = new OpenGrid_Main();
|
||||||
thegrid.Startup();
|
thegrid.Startup();
|
||||||
|
@ -73,11 +76,10 @@ namespace OpenGridServices.GridServer
|
||||||
|
|
||||||
private void Work()
|
private void Work()
|
||||||
{
|
{
|
||||||
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"\nEnter help for a list of commands\n");
|
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
m_console.MainConsolePrompt();
|
Thread.Sleep(5000);
|
||||||
|
// should flush the DB etc here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,6 +96,7 @@ namespace OpenGridServices.GridServer
|
||||||
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration");
|
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration");
|
||||||
Cfg = this.LoadConfigDll(this.ConfigDll);
|
Cfg = this.LoadConfigDll(this.ConfigDll);
|
||||||
Cfg.InitConfig();
|
Cfg.InitConfig();
|
||||||
|
if(setuponly) Environment.Exit(0);
|
||||||
|
|
||||||
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Connecting to Storage Server");
|
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Connecting to Storage Server");
|
||||||
m_gridManager = new GridManager();
|
m_gridManager = new GridManager();
|
||||||
|
@ -129,7 +132,7 @@ namespace OpenGridServices.GridServer
|
||||||
|
|
||||||
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting sim status checker");
|
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting sim status checker");
|
||||||
|
|
||||||
Timer simCheckTimer = new Timer( 300000 ); // 5 minutes
|
System.Timers.Timer simCheckTimer = new System.Timers.Timer( 300000 ); // 5 minutes
|
||||||
simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
|
simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
|
||||||
simCheckTimer.Enabled = true;
|
simCheckTimer.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
@ -65,8 +66,13 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase {
|
||||||
private static string SetupGrid()
|
private static string SetupGrid()
|
||||||
{
|
{
|
||||||
Console.WriteLine("Running external program (OpenGridServices.GridServer.exe) to configure the grid server");
|
Console.WriteLine("Running external program (OpenGridServices.GridServer.exe) to configure the grid server");
|
||||||
// TODO: Drop the console! and then configure using CLI params and/or XML files
|
Process p = new Process();
|
||||||
return "<grid></grid>";
|
|
||||||
|
p.StartInfo.Arguments = "-setuponly";
|
||||||
|
p.StartInfo.FileName = "OpenGridServices.GridServer.exe";
|
||||||
|
p.Start();
|
||||||
|
|
||||||
|
return "<gridserver />"; // we let the gridserver handle it's own setup
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string SetupUser()
|
private static string SetupUser()
|
||||||
|
|
Loading…
Reference in New Issue