diff options
Diffstat (limited to 'OpenGridServices/ServiceManager/ServiceManager.cs')
-rw-r--r-- | OpenGridServices/ServiceManager/ServiceManager.cs | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/OpenGridServices/ServiceManager/ServiceManager.cs b/OpenGridServices/ServiceManager/ServiceManager.cs index 1de9475..8200b5b 100644 --- a/OpenGridServices/ServiceManager/ServiceManager.cs +++ b/OpenGridServices/ServiceManager/ServiceManager.cs | |||
@@ -52,8 +52,8 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
52 | XmlNode rootnode = doc.FirstChild; | 52 | XmlNode rootnode = doc.FirstChild; |
53 | if (rootnode.Name != "regions") | 53 | if (rootnode.Name != "regions") |
54 | { | 54 | { |
55 | EventLog.WriteEntry("ERROR! bad XML in opengrid-master-cfg.xml - expected regions tag"); | 55 | EventLog.WriteEntry("ERROR! bad XML in opengrid-master-cfg.xml - expected regions tag"); |
56 | Console.WriteLine("Sorry, could not startup the service - please check your opengrid-master-cfg.xml file: missing regions tag"); | 56 | Console.WriteLine("Sorry, could not startup the service - please check your opengrid-master-cfg.xml file: missing regions tag"); |
57 | (new ServiceController("OpenGridServices-master")).Stop(); | 57 | (new ServiceController("OpenGridServices-master")).Stop(); |
58 | } | 58 | } |
59 | 59 | ||
@@ -72,8 +72,8 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
72 | } | 72 | } |
73 | 73 | ||
74 | private static string SetupGrid() | 74 | private static string SetupGrid() |
75 | { | 75 | { |
76 | Console.WriteLine("Running external program (OpenGridServices.GridServer.exe) to configure the grid server"); | 76 | Console.WriteLine("Running external program (OpenGridServices.GridServer.exe) to configure the grid server"); |
77 | try { | 77 | try { |
78 | Process p = new Process(); | 78 | Process p = new Process(); |
79 | 79 | ||
@@ -92,8 +92,8 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
92 | string configxml = reader.ReadToEnd(); | 92 | string configxml = reader.ReadToEnd(); |
93 | 93 | ||
94 | return configxml; | 94 | return configxml; |
95 | } catch(Exception e) { | 95 | } catch(Exception e) { |
96 | Console.WriteLine("An error occurred while running the grid server, please rectify it and try again"); | 96 | Console.WriteLine("An error occurred while running the grid server, please rectify it and try again"); |
97 | Console.WriteLine(e.ToString()); | 97 | Console.WriteLine(e.ToString()); |
98 | Environment.Exit(1); | 98 | Environment.Exit(1); |
99 | } | 99 | } |
@@ -121,9 +121,9 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
121 | 121 | ||
122 | string listenaddr; | 122 | string listenaddr; |
123 | string simconfigxml; | 123 | string simconfigxml; |
124 | LLUUID SimUUID; | 124 | LLUUID SimUUID; |
125 | 125 | ||
126 | Console.WriteLine("Setting up region servers"); | 126 | Console.WriteLine("Setting up region servers"); |
127 | Console.Write("Please specify a path to store your region data (e.g /etc/opensim/regions: "); | 127 | Console.Write("Please specify a path to store your region data (e.g /etc/opensim/regions: "); |
128 | string regionpath=Console.ReadLine(); | 128 | string regionpath=Console.ReadLine(); |
129 | 129 | ||
@@ -134,11 +134,11 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
134 | baseport=Convert.ToUInt16(Console.ReadLine()); | 134 | baseport=Convert.ToUInt16(Console.ReadLine()); |
135 | 135 | ||
136 | 136 | ||
137 | listenaddr=Console.ReadLine(); | 137 | listenaddr=Console.ReadLine(); |
138 | 138 | ||
139 | Console.WriteLine("Now ready to configure regions, please answer the questions about each region in turn"); | 139 | Console.WriteLine("Now ready to configure regions, please answer the questions about each region in turn"); |
140 | for(int i=0; i<=numofregions; i++) { | 140 | for(int i=0; i<=numofregions; i++) { |
141 | Console.WriteLine("Configuring region number " + i.ToString()); | 141 | Console.WriteLine("Configuring region number " + i.ToString()); |
142 | 142 | ||
143 | Console.Write("Region name: "); | 143 | Console.Write("Region name: "); |
144 | regionname=Console.ReadLine(); | 144 | regionname=Console.ReadLine(); |
@@ -177,13 +177,13 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
177 | bool region=false; | 177 | bool region=false; |
178 | while(choice!="OK") | 178 | while(choice!="OK") |
179 | { | 179 | { |
180 | Console.Clear(); | 180 | Console.Clear(); |
181 | Console.WriteLine("Please select the components you would like to run on this server:\n"); | 181 | Console.WriteLine("Please select the components you would like to run on this server:\n"); |
182 | 182 | ||
183 | Console.WriteLine("1 - [" + (grid ? "X" : " ") + "] Grid server - this service handles co-ordinates of regions/sims on the grid"); | 183 | Console.WriteLine("1 - [" + (grid ? "X" : " ") + "] Grid server - this service handles co-ordinates of regions/sims on the grid"); |
184 | Console.WriteLine("2 - [" + (user ? "X" : " ") + "] User server - this service handles user login, profiles, inventory and IM"); | 184 | Console.WriteLine("2 - [" + (user ? "X" : " ") + "] User server - this service handles user login, profiles, inventory and IM"); |
185 | Console.WriteLine("3 - [" + (asset ? "X" : " ") + "] Asset server - this service handles storage of assets such as textures, objects, sounds, scripts"); | 185 | Console.WriteLine("3 - [" + (asset ? "X" : " ") + "] Asset server - this service handles storage of assets such as textures, objects, sounds, scripts"); |
186 | 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"); | 186 | 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"); |
187 | 187 | ||
188 | 188 | ||
189 | Console.Write("Type a number to toggle a choice or type OK to accept your current choices: "); | 189 | Console.Write("Type a number to toggle a choice or type OK to accept your current choices: "); |
@@ -217,15 +217,15 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
217 | public static void Main() | 217 | public static void Main() |
218 | { | 218 | { |
219 | if(!File.Exists("opengrid-master-cfg.xml")) | 219 | if(!File.Exists("opengrid-master-cfg.xml")) |
220 | { | 220 | { |
221 | Console.WriteLine("Could not find a config file, running initial setup"); | 221 | Console.WriteLine("Could not find a config file, running initial setup"); |
222 | InitSetup(); | 222 | InitSetup(); |
223 | } | 223 | } |
224 | Console.WriteLine("Starting up OGS master service"); | 224 | Console.WriteLine("Starting up OGS master service"); |
225 | try { | 225 | try { |
226 | ServiceBase.Run(new OpenGridMasterService()); | 226 | ServiceBase.Run(new OpenGridMasterService()); |
227 | } catch(Exception e) { | 227 | } catch(Exception e) { |
228 | Console.WriteLine("THIS SHOULD NEVER HAPPEN!!!!!!!!!!!!!!!!!!!!!"); | 228 | Console.WriteLine("THIS SHOULD NEVER HAPPEN!!!!!!!!!!!!!!!!!!!!!"); |
229 | Console.WriteLine(e.ToString()); | 229 | Console.WriteLine(e.ToString()); |
230 | } | 230 | } |
231 | } | 231 | } |