allow running as root in a container environment

This commit is contained in:
Andrew Dolgov 2022-02-17 17:32:02 +03:00
parent 079f6dfdd0
commit 89ef98e57e
1 changed files with 1 additions and 1 deletions

View File

@ -510,7 +510,7 @@ class Config {
array_push($errors, "Please enable at least one authentication module via PLUGINS");
}
if (function_exists('posix_getuid') && posix_getuid() == 0) {
if (function_exists('posix_getuid') && posix_getuid() == 0 && !getenv("container")) {
array_push($errors, "Please don't run this script as root.");
}