mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Add root privileges notice
This commit is contained in:
@@ -276,6 +276,20 @@ namespace Jackett.Services
|
||||
logger.Error("Error while getting environment details: " + e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (Environment.UserName == "root")
|
||||
{
|
||||
var notice = "Jackett is running with root privileges. You should run Jackett as an unprivileged user.";
|
||||
_notices.Add(notice);
|
||||
logger.Error(notice);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.Error(e, "Error while checking the username");
|
||||
}
|
||||
|
||||
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US");
|
||||
// Load indexers
|
||||
indexerService.InitIndexers(configService.GetCardigannDefinitionsFolders());
|
||||
|
Reference in New Issue
Block a user