aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ServiceManager/ServiceManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ServiceManager/ServiceManager.cs')
-rw-r--r--ServiceManager/ServiceManager.cs46
1 files changed, 46 insertions, 0 deletions
diff --git a/ServiceManager/ServiceManager.cs b/ServiceManager/ServiceManager.cs
index c7a6583..de9f415 100644
--- a/ServiceManager/ServiceManager.cs
+++ b/ServiceManager/ServiceManager.cs
@@ -62,8 +62,54 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase {
62 62
63 } 63 }
64 64
65 public static void InitSetup()
66 {
67 string choice="";
68 bool grid=false;
69 bool user=false;
70 bool asset=false;
71 bool region=false;
72 while(choice!="OK")
73 {
74 Console.Clear();
75 Console.WriteLine("Please select the components you would like to run on this server:\n");
76
77 Console.WriteLine("1 - [" + (grid ? "X" : " ") + "] Grid server - this service handles co-ordinates of regions/sims on the grid");
78 Console.WriteLine("2 - [" + (user ? "X" : " ") + "] User server - this service handles user login, profiles, inventory and IM");
79 Console.WriteLine("3 - [" + (asset ? "X" : " ") + "] Asset server - this service handles storage of assets such as textures, objects, sounds, scripts");
80 Console.WriteLine("4 - [" + (region ? "X" : " ") + "] Region server - this is the main opensim server and can run without the above services, it handles physics simulation, terrain, building and other such features");
81
82
83 Console.Write("Type a number to toggle a choice or type OK to accept your current choices: ");
84 choice = Console.ReadLine();
85 switch(choice)
86 {
87 case "1":
88 grid = (!grid);
89 break;
90
91 case "2":
92 user = (!user);
93 break;
94
95 case "3":
96 asset = (!asset);
97 break;
98
99 case "4":
100 region = (!region);
101 break;
102 }
103 }
104 }
105
65 public static void Main() 106 public static void Main()
66 { 107 {
108 if(!File.Exists("opengrid-master-cfg.xml"))
109 {
110 Console.WriteLine("Could not find a config file, running initial setup");
111 InitSetup();
112 }
67 Console.WriteLine("Starting up OGS master service"); 113 Console.WriteLine("Starting up OGS master service");
68 try { 114 try {
69 ServiceBase.Run(new OpenGridMasterService()); 115 ServiceBase.Run(new OpenGridMasterService());