Make a renamed OpenSim.Server.exe use the corret ini file, e.g.

renaming OpenSim.Server.exe to OpenSim.AssetServer.exe will cause
OpenSim.AssetServer.ini to be read by that instance. This facilitates legacy
usage
trunk
Melanie Thielker 2009-07-07 21:23:11 +00:00
parent f10e53d167
commit 4badac3c90
1 changed files with 5 additions and 5 deletions

View File

@ -26,6 +26,7 @@
*/ */
using System; using System;
using System.IO;
using System.Xml; using System.Xml;
using System.Threading; using System.Threading;
using System.Reflection; using System.Reflection;
@ -83,10 +84,8 @@ namespace OpenSim.Server.Base
// Automagically create the ini file name // Automagically create the ini file name
// //
string fullName = Assembly.GetEntryAssembly().FullName; string fileName = Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location);
AssemblyName assemblyName = new AssemblyName(fullName); string iniFile = fileName + ".ini";
string iniFile = assemblyName.Name + ".ini";
IConfig startupConfig = argvConfig.Configs["Startup"]; IConfig startupConfig = argvConfig.Configs["Startup"];
if (startupConfig != null) if (startupConfig != null)
@ -204,7 +203,8 @@ namespace OpenSim.Server.Base
{ {
if (startupConfig != null) if (startupConfig != null)
fileAppender.File = startupConfig.GetString("logfile", fileAppender.File = startupConfig.GetString("logfile",
assemblyName.Name + ".log"); fileName + ".log");
// assemblyName.Name + ".log");
} }
// Register the quit command // Register the quit command