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
|
fi
|
||||||
|
|
||||||
if [ ! -d ${CLICKHOUSE_DATADIR} ]; then
|
if [ ! -d ${CLICKHOUSE_DATADIR} ]; then
|
||||||
|
|
||||||
# only for compatibility for old /opt/clickhouse, remove after 2017-06-01
|
# only for compatibility for old /opt/clickhouse, remove after 2017-06-01
|
||||||
if [ -d ${CLICKHOUSE_DATADIR_OLD} ]; then
|
if [ -d ${CLICKHOUSE_DATADIR_OLD} ]; then
|
||||||
ln -s ${CLICKHOUSE_DATADIR_OLD} ${CLICKHOUSE_DATADIR}
|
ln -s ${CLICKHOUSE_DATADIR_OLD} ${CLICKHOUSE_DATADIR}
|
||||||
else
|
else
|
||||||
# DONT remove after 2017-06-01 :
|
# DONT remove after 2017-06-01 :
|
||||||
mkdir -p ${CLICKHOUSE_DATADIR}
|
mkdir -p ${CLICKHOUSE_DATADIR}
|
||||||
|
chown ${CLICKHOUSE_USER}:${CLICKHOUSE_GROUP} ${CLICKHOUSE_DATADIR}
|
||||||
|
chmod 700 ${CLICKHOUSE_DATADIR}
|
||||||
fi
|
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
|
fi
|
||||||
|
|
||||||
if [ ! -d ${CLICKHOUSE_LOGDIR} ]; then
|
if [ ! -d ${CLICKHOUSE_LOGDIR} ]; then
|
||||||
mkdir -p ${CLICKHOUSE_LOGDIR}
|
mkdir -p ${CLICKHOUSE_LOGDIR}
|
||||||
chown root:${CLICKHOUSE_GROUP} ${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
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ initdb()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#Temporary fix for old metrika user, remove after 2017-06-01
|
#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}]"
|
echo "Changing owner of old [${CLICKHOUSE_DATADIR_OLD}] to [${CLICKHOUSE_USER}:${CLICKHOUSE_GROUP}]"
|
||||||
chown -R ${CLICKHOUSE_USER}:${CLICKHOUSE_GROUP} ${CLICKHOUSE_DATADIR_OLD}
|
chown -R ${CLICKHOUSE_USER}:${CLICKHOUSE_GROUP} ${CLICKHOUSE_DATADIR_OLD}
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user