diff --git a/src/Tgstation.Server.Host.Service/Program.cs b/src/Tgstation.Server.Host.Service/Program.cs
index 21123e7288..59c11072a7 100644
--- a/src/Tgstation.Server.Host.Service/Program.cs
+++ b/src/Tgstation.Server.Host.Service/Program.cs
@@ -60,7 +60,7 @@ namespace Tgstation.Server.Host.Service
UseShellExecute = true,
Verb = "runas",
Arguments = String.Join(" ", argList),
- FileName = Assembly.GetExecutingAssembly().Location,
+ FileName = exe,
WorkingDirectory = Environment.CurrentDirectory,
};
using (Process.Start(startInfo))
diff --git a/src/Tgstation.Server.Host/Components/DreamDaemonExecutor.cs b/src/Tgstation.Server.Host/Components/DreamDaemonExecutor.cs
index 3d53c14e87..6c08cf40ac 100644
--- a/src/Tgstation.Server.Host/Components/DreamDaemonExecutor.cs
+++ b/src/Tgstation.Server.Host/Components/DreamDaemonExecutor.cs
@@ -1,14 +1,8 @@
-using Newtonsoft.Json;
-using System;
+using System;
using System.Diagnostics;
using System.Globalization;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Models.Internal;
-using Tgstation.Server.Host.Components.Models;
-using Tgstation.Server.Host.Core;
namespace Tgstation.Server.Host.Components
{
@@ -35,34 +29,11 @@ namespace Tgstation.Server.Host.Components
}
}
- ///
- /// The for the
- ///
- readonly IInstanceShutdownHandler instanceShutdownMethod;
- ///
- /// The for the
- ///
- readonly IIOManager ioManager;
- ///
- /// The for the
- ///
- readonly IApplication application;
-
- ///
- /// Construct a
- ///
- /// The value of
- /// The value of
- /// The value of
- public DreamDaemonExecutor(IInstanceShutdownHandler instanceShutdownMethod, IIOManager ioManager, IApplication application)
- {
- this.instanceShutdownMethod = instanceShutdownMethod ?? throw new ArgumentNullException(nameof(instanceShutdownMethod));
- this.ioManager = ioManager ?? throw new ArgumentNullException(nameof(ioManager));
- this.application = application ?? throw new ArgumentNullException(nameof(application));
- }
+ ///
+ public IDreamDaemonSession AttachToDreamDaemon(int processId) => new DreamDaemonSession(Process.GetProcessById(processId));
///
- public async Task RunDreamDaemon(DreamDaemonLaunchParameters launchParameters, TaskCompletionSource