diff options
Diffstat (limited to 'databases/clickhouse/files/clickhouse.in')
-rw-r--r-- | databases/clickhouse/files/clickhouse.in | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/databases/clickhouse/files/clickhouse.in b/databases/clickhouse/files/clickhouse.in index f058335c875d..a3ff2098e49b 100644 --- a/databases/clickhouse/files/clickhouse.in +++ b/databases/clickhouse/files/clickhouse.in @@ -8,6 +8,9 @@ # # clickhouse_enable (bool): Set to "NO" by default # Set it to "YES" to enable clickhouse server +%%LEGACY_LIMITS%%# clickhouse_limits (bool): Set to "NO" by default. +%%LEGACY_LIMITS%%# Set it to yes to run `limits -e -U clickhouse` +%%LEGACY_LIMITS%%# just before clickhouse starts. # clickhouse_config (str): Path to config file (required). # (default: %%PREFIX%%/etc/clickhouse-server/config.xml) # clickhouse_rundir (str): Path to directory holding a pidfile. @@ -29,6 +32,7 @@ rcvar=clickhouse_enable load_rc_config ${name} : ${clickhouse_enable="NO"} +%%LEGACY_LIMITS%%: ${clickhouse_limits="NO"} : ${clickhouse_config="%%PREFIX%%/etc/clickhouse-server/config.xml"} : ${clickhouse_rundir="/var/run/clickhouse"} : ${clickhouse_user="clickhouse"} @@ -50,7 +54,12 @@ clickhouse_prestart () { install -d -o ${clickhouse_user} -g ${clickhouse_group} ${_dir} done - return 0 +%%LEGACY_LIMITS%% if checkyesno clickhouse_limits; then +%%LEGACY_LIMITS%% eval `/usr/bin/limits -e -U ${clickhouse_user}` 2>/dev/null +%%LEGACY_LIMITS%% else +%%LEGACY_LIMITS%% return 0 +%%LEGACY_LIMITS%% fi +%%MODERN_LIMITS%% return 0 } run_rc_command "$1" |