mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 10:31:57 +00:00
Merge branch 'master' of github.com:yandex/ClickHouse
This commit is contained in:
commit
1ef225be92
11
debian/clickhouse-server-base.postinst
vendored
11
debian/clickhouse-server-base.postinst
vendored
@ -45,25 +45,22 @@ Please fix this and reinstall this package." >&2
|
||||
fi
|
||||
|
||||
if [ ! -d ${CLICKHOUSE_DATADIR} ]; then
|
||||
|
||||
# only for compatibility for old /opt/clickhouse, remove after 2017-06-01
|
||||
if [ -d ${CLICKHOUSE_DATADIR_OLD} ]; then
|
||||
ln -s ${CLICKHOUSE_DATADIR_OLD} ${CLICKHOUSE_DATADIR}
|
||||
else
|
||||
# DONT remove after 2017-06-01 :
|
||||
mkdir -p ${CLICKHOUSE_DATADIR}
|
||||
chown ${CLICKHOUSE_USER}:${CLICKHOUSE_GROUP} ${CLICKHOUSE_DATADIR}
|
||||
chmod 700 ${CLICKHOUSE_DATADIR}
|
||||
fi
|
||||
|
||||
# ensure home directory ownership
|
||||
#su -s /bin/sh clickhouse -c "test -O /var/lib/clickhouse && test -G /var/lib/clickhouse" || \
|
||||
chown ${CLICKHOUSE_USER}:${CLICKHOUSE_GROUP} ${CLICKHOUSE_DATADIR}
|
||||
chmod 700 ${CLICKHOUSE_DATADIR}
|
||||
fi
|
||||
|
||||
if [ ! -d ${CLICKHOUSE_LOGDIR} ]; then
|
||||
mkdir -p ${CLICKHOUSE_LOGDIR}
|
||||
chown root:${CLICKHOUSE_GROUP} ${CLICKHOUSE_LOGDIR}
|
||||
chmod 770 ${CLICKHOUSE_LOGDIR}
|
||||
# Allow everyone to read logs, root and clickhouse to read-write
|
||||
chmod 775 ${CLICKHOUSE_LOGDIR}
|
||||
fi
|
||||
|
||||
|
||||
|
@ -135,7 +135,7 @@ initdb()
|
||||
fi
|
||||
|
||||
#Temporary fix for old metrika user, remove after 2017-06-01
|
||||
if [ ! -z ${CLICKHOUSE_DATADIR_OLD} ] && [ -d ${CLICKHOUSE_DATADIR_OLD} ] && [ ! `su -s $SHELL ${CLICKHOUSE_USER} -c "test -w ${CLICKHOUSE_DATADIR_OLD}"` ]; then
|
||||
if [ ! -z ${CLICKHOUSE_DATADIR_OLD} ] && [ -d ${CLICKHOUSE_DATADIR_OLD} ] && ! `su -s $SHELL ${CLICKHOUSE_USER} -c "test -w ${CLICKHOUSE_DATADIR_OLD}"` ; then
|
||||
echo "Changing owner of old [${CLICKHOUSE_DATADIR_OLD}] to [${CLICKHOUSE_USER}:${CLICKHOUSE_GROUP}]"
|
||||
chown -R ${CLICKHOUSE_USER}:${CLICKHOUSE_GROUP} ${CLICKHOUSE_DATADIR_OLD}
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user