From 58783a5216b81863988110174229a65ceb315e1e Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 4 Nov 2016 00:46:34 +1000 Subject: Attempt to move everything writable, and the configs, out of the bin directory. Log configs are still in the bin directory. --- OpenSim/Data/SQLite/SQLiteAssetData.cs | 4 ++-- OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 2 +- OpenSim/Data/Tests/BasicDataServiceTest.cs | 2 +- OpenSim/Data/Tests/Resources/TestDataConnections.ini | 4 ++-- OpenSim/Framework/Util.cs | 4 ++-- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 2 +- OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs | 2 +- OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs | 2 +- OpenSim/Region/ScriptEngine/Shared/AssemblyResolver.cs | 2 +- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 4 ++-- OpenSim/Server/Base/ServicesServerBase.cs | 2 +- OpenSim/Services/MapImageService/MapImageService.cs | 2 +- OpenSim/Tests/Robust/Server/DemonServer.cs | 4 ++-- 13 files changed, 18 insertions(+), 18 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index f0dda64..30b26c4 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs @@ -86,7 +86,7 @@ namespace OpenSim.Data.SQLite if (dbconnect == string.Empty) { - dbconnect = "URI=file:Asset.db,version=3"; + dbconnect = "URI=file:../db/Asset.db,version=3"; } m_conn = new SqliteConnection(dbconnect); m_conn.Open(); @@ -358,7 +358,7 @@ namespace OpenSim.Data.SQLite /// override public void Initialise() { - Initialise("URI=file:Asset.db,version=3"); + Initialise("URI=file:../db/Asset.db,version=3"); } /// diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 7d493ca..7caf347 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs @@ -82,7 +82,7 @@ namespace OpenSim.Data.SQLite if (dbconnect == string.Empty) { - dbconnect = "URI=file:inventoryStore.db,version=3"; + dbconnect = "URI=file:../db/inventoryStore.db,version=3"; } m_log.Info("[INVENTORY DB]: Sqlite - connecting: " + dbconnect); conn = new SqliteConnection(dbconnect); diff --git a/OpenSim/Data/Tests/BasicDataServiceTest.cs b/OpenSim/Data/Tests/BasicDataServiceTest.cs index acfebd0..8c296b9 100644 --- a/OpenSim/Data/Tests/BasicDataServiceTest.cs +++ b/OpenSim/Data/Tests/BasicDataServiceTest.cs @@ -106,7 +106,7 @@ namespace OpenSim.Data.Tests if (String.IsNullOrEmpty(m_connStr)) { m_file = Path.GetTempFileName() + ".db"; - m_connStr = "URI=file:" + m_file + ",version=3"; + m_connStr = "URI=file:../db/" + m_file + ",version=3"; } } diff --git a/OpenSim/Data/Tests/Resources/TestDataConnections.ini b/OpenSim/Data/Tests/Resources/TestDataConnections.ini index 7b55467..75f7855 100644 --- a/OpenSim/Data/Tests/Resources/TestDataConnections.ini +++ b/OpenSim/Data/Tests/Resources/TestDataConnections.ini @@ -16,9 +16,9 @@ ; file for the DB. If you want the resulting DB to persist (e.g. for performance testing, ; when filling up the tables can take a long time), explicitly specify a conn string like this: -; SqliteConnection="URI=file:,version=3" +; SqliteConnection="URI=file:../db/,version=3" [TestConnections] MySqlConnection="Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;" SqlConnection="Server=.\SQL2008;Database=opensim-nunit;Trusted_Connection=True;" -SqliteConnection="URI=file:opensim-nunit.db,version=3" \ No newline at end of file +SqliteConnection="URI=file:../db/opensim-nunit.db,version=3" \ No newline at end of file diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 1f74168..b5c3e75 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -987,7 +987,7 @@ namespace OpenSim.Framework public static string configDir() { - return "."; + return "../config"; } public static string dataDir() @@ -1005,7 +1005,7 @@ namespace OpenSim.Framework } } - return "./OpenSim.log"; + return "../logs/OpenSim.log"; } public static string logDir() diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 7d9c9a9..82c95c2 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -64,7 +64,7 @@ namespace OpenSim.Region.CoreModules.Asset private bool m_Enabled; private const string m_ModuleName = "FlotsamAssetCache"; - private const string m_DefaultCacheDirectory = "./assetcache"; + private const string m_DefaultCacheDirectory = "../caches/assetcache"; private string m_CacheDirectory = m_DefaultCacheDirectory; private readonly List m_InvalidChars = new List(); diff --git a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs index bcb6361..f6772db 100644 --- a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs @@ -96,7 +96,7 @@ namespace OpenSim.Region.UserStatistics //IConfig startupConfig = config.Configs["Startup"]; - dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3"); + dbConn = new SqliteConnection("URI=file:../db/LocalUserStatistics.db,version=3"); dbConn.Open(); CreateTables(dbConn); diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs index 4d25bf3..3a944d1 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs @@ -99,7 +99,7 @@ namespace OpenSim.Region.PhysicsModules.Meshing IConfig mesh_config = source.Configs["Mesh"]; - decodedSculptMapPath = config.GetString("DecodedSculptMapPath", "j2kDecodeCache"); + decodedSculptMapPath = "../caches/" + config.GetString("DecodedSculptMapPath", "j2kDecodeCache"); cacheSculptMaps = config.GetBoolean("CacheSculptMaps", cacheSculptMaps); if (mesh_config != null) { diff --git a/OpenSim/Region/ScriptEngine/Shared/AssemblyResolver.cs b/OpenSim/Region/ScriptEngine/Shared/AssemblyResolver.cs index e35f79f..6c42e2e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/AssemblyResolver.cs +++ b/OpenSim/Region/ScriptEngine/Shared/AssemblyResolver.cs @@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.Shared string dirName = myDomain.FriendlyName; string ScriptEnginesPath = myDomain.SetupInformation.PrivateBinPath; - string[] pathList = new string[] {"", "bin", ScriptEnginesPath, + string[] pathList = new string[] {"", "caches", ScriptEnginesPath, Path.Combine(ScriptEnginesPath, dirName)}; string assemblyName = args.Name; diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 78d4ee9..6df36f7 100755 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -309,7 +309,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_WaitForEventCompletionOnScriptStop = m_ScriptConfig.GetInt("WaitForEventCompletionOnScriptStop", m_WaitForEventCompletionOnScriptStop); - m_ScriptEnginesPath = m_ScriptConfig.GetString("ScriptEnginesPath", "ScriptEngines"); + m_ScriptEnginesPath = "../caches/" + m_ScriptConfig.GetString("ScriptEnginesPath", "ScriptEngines"); m_Prio = ThreadPriority.BelowNormal; switch (priority) @@ -1817,7 +1817,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine if (!(sender is System.AppDomain)) return null; - string[] pathList = new string[] {"bin", m_ScriptEnginesPath, + string[] pathList = new string[] {"caches", m_ScriptEnginesPath, Path.Combine(m_ScriptEnginesPath, m_Scene.RegionInfo.RegionID.ToString())}; diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs index 1f2c54d..40cec08 100644 --- a/OpenSim/Server/Base/ServicesServerBase.cs +++ b/OpenSim/Server/Base/ServicesServerBase.cs @@ -85,7 +85,7 @@ namespace OpenSim.Server.Base string fileName = ""; if (Assembly.GetEntryAssembly() != null) fileName = Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location); - string iniFile = fileName + ".ini"; + string iniFile = "../config/" + fileName + ".ini"; string logConfig = null; IConfig startupConfig = argvConfig.Configs["Startup"]; diff --git a/OpenSim/Services/MapImageService/MapImageService.cs b/OpenSim/Services/MapImageService/MapImageService.cs index a816411..6b4a91a 100644 --- a/OpenSim/Services/MapImageService/MapImageService.cs +++ b/OpenSim/Services/MapImageService/MapImageService.cs @@ -80,7 +80,7 @@ namespace OpenSim.Services.MapImageService IConfig serviceConfig = config.Configs["MapImageService"]; if (serviceConfig != null) { - m_TilesStoragePath = serviceConfig.GetString("TilesStoragePath", m_TilesStoragePath); + m_TilesStoragePath = "../caches/" + serviceConfig.GetString("TilesStoragePath", m_TilesStoragePath); if (!Directory.Exists(m_TilesStoragePath)) Directory.CreateDirectory(m_TilesStoragePath); diff --git a/OpenSim/Tests/Robust/Server/DemonServer.cs b/OpenSim/Tests/Robust/Server/DemonServer.cs index 1e0797e..205abfb 100644 --- a/OpenSim/Tests/Robust/Server/DemonServer.cs +++ b/OpenSim/Tests/Robust/Server/DemonServer.cs @@ -48,8 +48,8 @@ namespace Robust.Tests [SetUp] public void StartDemon() { - if (File.Exists("Robust.Tests.log")) - File.Delete("Robust.Tests.log"); + if (File.Exists("../logs/Robust.Tests.log")) + File.Delete("../logs/Robust.Tests.log"); Console.WriteLine("**** Starting demon Robust server ****"); m_demon = new Thread( () => Main(new string[] {"-inifile=Robust.Tests.ini"})); -- cgit v1.1