updater: Removed admin rights requirement to start service on Windows when Jackett updates. (#9320)

This commit is contained in:
ultnrg 2020-09-12 10:25:27 +10:00 committed by GitHub
parent b6fab0b78b
commit 25f2b8534b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -480,12 +480,13 @@ namespace Jackett.Updater
{
logger.Info("Starting Windows service");
if (ServerUtil.IsUserAdministrator())
try
{
windowsService.Start();
}
else
catch
{
logger.Info("Failed to start service. Attempting to start console.");
try
{
var consolePath = Path.Combine(options.Path, "JackettConsole.exe");
@ -493,7 +494,7 @@ namespace Jackett.Updater
}
catch
{
logger.Error("Failed to get admin rights to start the service.");
logger.Error("Failed to start the service or console.");
}
}
}