mirror of https://github.com/Jackett/Jackett
updater: Removed admin rights requirement to start service on Windows when Jackett updates. (#9320)
This commit is contained in:
parent
b6fab0b78b
commit
25f2b8534b
|
@ -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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue