mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Merge pull request #53418 from ClickHouse/sudo-preserve-env
Attempt to address reset ENV in init.d script
This commit is contained in:
commit
5d0a05ef19
@ -997,7 +997,9 @@ namespace
|
||||
{
|
||||
/// sudo respects limits in /etc/security/limits.conf e.g. open files,
|
||||
/// that's why we are using it instead of the 'clickhouse su' tool.
|
||||
command = fmt::format("sudo -u '{}' {}", user, command);
|
||||
/// by default, sudo resets all the ENV variables, but we should preserve
|
||||
/// the values /etc/default/clickhouse in /etc/init.d/clickhouse file
|
||||
command = fmt::format("sudo --preserve-env -u '{}' {}", user, command);
|
||||
}
|
||||
|
||||
fmt::print("Will run {}\n", command);
|
||||
|
Loading…
Reference in New Issue
Block a user