|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using NLog;
|
|
|
|
|
using NzbDrone.Common;
|
|
|
|
@ -30,7 +30,7 @@ namespace NzbDrone.Update.UpdateEngine
|
|
|
|
|
|
|
|
|
|
public void Start(AppType appType, string installationFolder)
|
|
|
|
|
{
|
|
|
|
|
_logger.Info("Starting NzbDrone");
|
|
|
|
|
_logger.Info("Starting Lidarr");
|
|
|
|
|
if (appType == AppType.Service)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
@ -40,7 +40,7 @@ namespace NzbDrone.Update.UpdateEngine
|
|
|
|
|
}
|
|
|
|
|
catch (InvalidOperationException e)
|
|
|
|
|
{
|
|
|
|
|
_logger.Warn(e, "Couldn't start NzbDrone Service (Most likely due to permission issues). falling back to console.");
|
|
|
|
|
_logger.Warn(e, "Couldn't start Lidarr Service (Most likely due to permission issues). falling back to console.");
|
|
|
|
|
StartConsole(installationFolder);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -56,18 +56,18 @@ namespace NzbDrone.Update.UpdateEngine
|
|
|
|
|
|
|
|
|
|
private void StartService()
|
|
|
|
|
{
|
|
|
|
|
_logger.Info("Starting NzbDrone service");
|
|
|
|
|
_logger.Info("Starting Lidarr service");
|
|
|
|
|
_serviceProvider.Start(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void StartWinform(string installationFolder)
|
|
|
|
|
{
|
|
|
|
|
Start(installationFolder, "NzbDrone.exe");
|
|
|
|
|
Start(installationFolder, "Lidarr.exe");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void StartConsole(string installationFolder)
|
|
|
|
|
{
|
|
|
|
|
Start(installationFolder, "NzbDrone.Console.exe");
|
|
|
|
|
Start(installationFolder, "Lidarr.Console.exe");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Start(string installationFolder, string fileName)
|
|
|
|
|