diff --git a/src/Tgstation.Server.Host/Database/DatabaseSeeder.cs b/src/Tgstation.Server.Host/Database/DatabaseSeeder.cs
index 7e0719022e..694fff0c9c 100644
--- a/src/Tgstation.Server.Host/Database/DatabaseSeeder.cs
+++ b/src/Tgstation.Server.Host/Database/DatabaseSeeder.cs
@@ -51,6 +51,11 @@ namespace Tgstation.Server.Host.Database
///
readonly DatabaseConfiguration databaseConfiguration;
+ ///
+ /// The for the .
+ ///
+ readonly SwarmConfiguration swarmConfiguration;
+
///
/// Add a default system to a given .
///
@@ -83,6 +88,7 @@ namespace Tgstation.Server.Host.Database
/// The value of .
/// The containing the value of .
/// The containing the value of .
+ /// The containing the value of .
/// The value of .
/// The value of .
public DatabaseSeeder(
@@ -90,6 +96,7 @@ namespace Tgstation.Server.Host.Database
IPlatformIdentifier platformIdentifier,
IOptions generalConfigurationOptions,
IOptions databaseConfigurationOptions,
+ IOptions swarmConfigurationOptions,
ILogger databaseLogger,
ILogger logger)
{
@@ -97,6 +104,7 @@ namespace Tgstation.Server.Host.Database
this.platformIdentifier = platformIdentifier ?? throw new ArgumentNullException(nameof(platformIdentifier));
databaseConfiguration = databaseConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(databaseConfigurationOptions));
generalConfiguration = generalConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(generalConfigurationOptions));
+ swarmConfiguration = swarmConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(swarmConfigurationOptions));
this.databaseLogger = databaseLogger ?? throw new ArgumentNullException(nameof(databaseLogger));
this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
}
@@ -227,6 +235,7 @@ namespace Tgstation.Server.Host.Database
var allInstances = await databaseContext
.Instances
.AsQueryable()
+ .Where(instance => instance.SwarmIdentifer == swarmConfiguration.Identifier)
.ToListAsync(cancellationToken);
foreach (var instance in allInstances)
instance.Path = platformIdentifier.NormalizePath(instance.Path!.Replace('\\', '/'));