aboutsummaryrefslogtreecommitdiff
path: root/databases/clickhouse/files
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2018-05-16 20:19:04 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2018-05-16 20:19:04 +0000
commita5230a2a323847b2b4a84c3fdf9a4b41dda77984 (patch)
tree1bb08c17c3ab03275e2c412644fad0cfde154a42 /databases/clickhouse/files
parent869f4ff556fabd2b1e1b1c2a61e1ca68161fcc55 (diff)
downloadports-a5230a2a323847b2b4a84c3fdf9a4b41dda77984.tar.gz
ports-a5230a2a323847b2b4a84c3fdf9a4b41dda77984.zip
Update to 1.1.54381 [1]
Adapt ${name}_limits to the new resource limiting mechanics for services PR: 228292 [1], 227223 [2] Submitted by: maintainer [1], 0mp@ [2]
Notes
Notes: svn path=/head/; revision=470149
Diffstat (limited to 'databases/clickhouse/files')
-rw-r--r--databases/clickhouse/files/clickhouse.in19
1 files changed, 10 insertions, 9 deletions
diff --git a/databases/clickhouse/files/clickhouse.in b/databases/clickhouse/files/clickhouse.in
index 06293a328434..79b5f0d8e0e1 100644
--- a/databases/clickhouse/files/clickhouse.in
+++ b/databases/clickhouse/files/clickhouse.in
@@ -10,9 +10,9 @@
#
# clickhouse_enable (bool): Set to "NO" by default
# Set it to "YES" to enable clickhouse server
-# clickhouse_limits (bool): Set to "NO" by default.
-# Set it to yes to run `limits -e -U clickhouse`
-# just before clickhouse starts.
+%%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.
@@ -34,7 +34,7 @@ rcvar=clickhouse_enable
load_rc_config ${name}
: ${clickhouse_enable="NO"}
-: ${clickhouse_limits="NO"}
+%%LEGACY_LIMITS%%: ${clickhouse_limits="NO"}
: ${clickhouse_config="%%PREFIX%%/etc/clickhouse-server/config.xml"}
: ${clickhouse_rundir="/var/run/clickhouse"}
: ${clickhouse_user="clickhouse"}
@@ -51,11 +51,12 @@ required_files=${clickhouse_config}
start_precmd=clickhouse_prestart
clickhouse_prestart () {
- if checkyesno clickhouse_limits; then
- eval `/usr/bin/limits -e -U ${clickhouse_user}` 2>/dev/null
- else
- return 0
- fi
+%%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"