1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-03-06 19:58:38 +00:00

core: Add option to disable root privileges warning ()

This commit is contained in:
Alex Iribarren 2024-04-22 20:03:24 +02:00 committed by GitHub
parent 22534dafa7
commit 49591b1b25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -274,7 +274,7 @@ namespace Jackett.Server.Services
try try
{ {
if (Environment.UserName == "root") if (Environment.UserName == "root" && (!bool.TryParse(Environment.GetEnvironmentVariable("DisableRootWarning"), out var disableRootWarning) || !disableRootWarning))
{ {
var notice = "Jackett is running with root privileges. You should run Jackett as an unprivileged user."; var notice = "Jackett is running with root privileges. You should run Jackett as an unprivileged user.";
notices.Add(notice); notices.Add(notice);