mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
updater: Removed admin rights requirement to start service on Windows when Jackett updates. (#9320)
This commit is contained in:
@@ -480,12 +480,13 @@ namespace Jackett.Updater
|
|||||||
{
|
{
|
||||||
logger.Info("Starting Windows service");
|
logger.Info("Starting Windows service");
|
||||||
|
|
||||||
if (ServerUtil.IsUserAdministrator())
|
try
|
||||||
{
|
{
|
||||||
windowsService.Start();
|
windowsService.Start();
|
||||||
}
|
}
|
||||||
else
|
catch
|
||||||
{
|
{
|
||||||
|
logger.Info("Failed to start service. Attempting to start console.");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var consolePath = Path.Combine(options.Path, "JackettConsole.exe");
|
var consolePath = Path.Combine(options.Path, "JackettConsole.exe");
|
||||||
@@ -493,7 +494,7 @@ namespace Jackett.Updater
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
logger.Error("Failed to get admin rights to start the service.");
|
logger.Error("Failed to start the service or console.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user