From be763ee43799a5e788e483d9e7f583418f82e4cf Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Tue, 3 Oct 2023 16:40:58 +0200 Subject: [PATCH] Use proper bash syntax for default values --- packages/clickhouse-keeper.postinstall | 10 +++++----- packages/clickhouse-server.postinstall | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/clickhouse-keeper.postinstall b/packages/clickhouse-keeper.postinstall index 3d6cd484146..2b4f303b684 100644 --- a/packages/clickhouse-keeper.postinstall +++ b/packages/clickhouse-keeper.postinstall @@ -3,12 +3,12 @@ set -e # set -x PROGRAM=clickhouse-keeper -KEEPER_USER=${KEEPER_USER:=clickhouse} -KEEPER_GROUP=${KEEPER_GROUP:=clickhouse} +KEEPER_USER=${KEEPER_USER:-clickhouse} +KEEPER_GROUP=${KEEPER_GROUP:-clickhouse} # Please note that we don't support paths with whitespaces. This is rather ignorant. -KEEPER_CONFDIR=${KEEPER_CONFDIR:=/etc/$PROGRAM} -KEEPER_DATADIR=${KEEPER_DATADIR:=/var/lib/clickhouse} -KEEPER_LOGDIR=${KEEPER_LOGDIR:=/var/log/$PROGRAM} +KEEPER_CONFDIR=${KEEPER_CONFDIR:-/etc/$PROGRAM} +KEEPER_DATADIR=${KEEPER_DATADIR:-/var/lib/clickhouse} +KEEPER_LOGDIR=${KEEPER_LOGDIR:-/var/log/$PROGRAM} [ -f /usr/share/debconf/confmodule ] && . /usr/share/debconf/confmodule [ -f /etc/default/clickhouse-keeper ] && . /etc/default/clickhouse-keeper diff --git a/packages/clickhouse-server.postinstall b/packages/clickhouse-server.postinstall index 2b9830faf3b..f5d473f7c9b 100644 --- a/packages/clickhouse-server.postinstall +++ b/packages/clickhouse-server.postinstall @@ -3,14 +3,14 @@ set -e # set -x PROGRAM=clickhouse-server -CLICKHOUSE_USER=${CLICKHOUSE_USER:=clickhouse} -CLICKHOUSE_GROUP=${CLICKHOUSE_GROUP:=${CLICKHOUSE_USER}} +CLICKHOUSE_USER=${CLICKHOUSE_USER:-clickhouse} +CLICKHOUSE_GROUP=${CLICKHOUSE_GROUP:-${CLICKHOUSE_USER}} # Please note that we don't support paths with whitespaces. This is rather ignorant. -CLICKHOUSE_CONFDIR=${CLICKHOUSE_CONFDIR:=/etc/clickhouse-server} -CLICKHOUSE_DATADIR=${CLICKHOUSE_DATADIR:=/var/lib/clickhouse} -CLICKHOUSE_LOGDIR=${CLICKHOUSE_LOGDIR:=/var/log/clickhouse-server} -CLICKHOUSE_BINDIR=${CLICKHOUSE_BINDIR:=/usr/bin} -CLICKHOUSE_GENERIC_PROGRAM=${CLICKHOUSE_GENERIC_PROGRAM:=clickhouse} +CLICKHOUSE_CONFDIR=${CLICKHOUSE_CONFDIR:-/etc/clickhouse-server} +CLICKHOUSE_DATADIR=${CLICKHOUSE_DATADIR:-/var/lib/clickhouse} +CLICKHOUSE_LOGDIR=${CLICKHOUSE_LOGDIR:-/var/log/clickhouse-server} +CLICKHOUSE_BINDIR=${CLICKHOUSE_BINDIR:-/usr/bin} +CLICKHOUSE_GENERIC_PROGRAM=${CLICKHOUSE_GENERIC_PROGRAM:-clickhouse} CLICKHOUSE_PIDDIR=/var/run/$PROGRAM [ -f /usr/share/debconf/confmodule ] && . /usr/share/debconf/confmodule