aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetInventoryServer/Main.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/AssetInventoryServer/Main.cs')
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Main.cs21
1 files changed, 9 insertions, 12 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/Main.cs b/OpenSim/Grid/AssetInventoryServer/Main.cs
index 2f01281..8f7d706 100644
--- a/OpenSim/Grid/AssetInventoryServer/Main.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Main.cs
@@ -28,7 +28,8 @@
28 */ 28 */
29 29
30using System; 30using System;
31using System.ServiceProcess; 31using Nini.Config;
32using log4net.Config;
32 33
33namespace OpenSim.Grid.AssetInventoryServer 34namespace OpenSim.Grid.AssetInventoryServer
34{ 35{
@@ -36,28 +37,24 @@ namespace OpenSim.Grid.AssetInventoryServer
36 { 37 {
37 static void Main(string[] args) 38 static void Main(string[] args)
38 { 39 {
39#if DEBUG 40 XmlConfigurator.Configure();
40 AssetInventoryServer server = new AssetInventoryServer(); 41
42 ArgvConfigSource configSource = new ArgvConfigSource(args);
43 configSource.AddSwitch("Startup", "inifile");
44
45 AssetInventoryServer server = new AssetInventoryServer(configSource);
41 if (server.Start()) 46 if (server.Start())
42 { 47 {
43 Console.WriteLine("Asset server is running. Press CTRL+C to quit");
44
45 Console.CancelKeyPress += 48 Console.CancelKeyPress +=
46 delegate(object sender, ConsoleCancelEventArgs e) 49 delegate(object sender, ConsoleCancelEventArgs e)
47 { 50 {
48 Console.WriteLine("Asset server is shutting down..."); 51 Console.WriteLine("AssetInventory server is shutting down...");
49 server.Shutdown(); 52 server.Shutdown();
50 Environment.Exit(0); 53 Environment.Exit(0);
51 }; 54 };
52 55
53 server.Work(); 56 server.Work();
54 //while (true)
55 // Console.ReadLine();
56 } 57 }
57#else
58 ServiceBase[] servicesToRun = new ServiceBase[] { new AssetInventoryServer() };
59 ServiceBase.Run(servicesToRun);
60#endif
61 } 58 }
62 } 59 }
63} 60}