mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
Merge d78fecde6c
into 44b4bd38b9
This commit is contained in:
commit
e445592f9b
@ -26,6 +26,14 @@ if [ ! -f "/etc/debian_version" ]; then
|
||||
fi
|
||||
|
||||
if [ "$1" = configure ] || [ -n "$not_deb_os" ]; then
|
||||
# 'ii' means install and installed
|
||||
# ('ic' for installed but configuration incomplete)
|
||||
# If it is the first installation, we might encounter the 'ic' (configuration incomplete) status when executing the postinst script
|
||||
installed=$(dpkg -l | grep -E '^ii\s+clickhouse-server\s')
|
||||
# already installed, use the old "is-enabled" status
|
||||
if [ -n "$installed" ]; then
|
||||
status=$(systemctl is-enabled clickhouse-server 2>/dev/null)
|
||||
fi
|
||||
|
||||
${CLICKHOUSE_GENERIC_PROGRAM} install --user "${CLICKHOUSE_USER}" --group "${CLICKHOUSE_GROUP}" --pid-path "${CLICKHOUSE_PIDDIR}" --config-path "${CLICKHOUSE_CONFDIR}" --binary-path "${CLICKHOUSE_BINDIR}" --log-path "${CLICKHOUSE_LOGDIR}" --data-path "${CLICKHOUSE_DATADIR}"
|
||||
|
||||
@ -36,7 +44,10 @@ if [ "$1" = configure ] || [ -n "$not_deb_os" ]; then
|
||||
fi
|
||||
|
||||
/bin/systemctl daemon-reload
|
||||
/bin/systemctl enable clickhouse-server
|
||||
# if service is not disabled, enable it
|
||||
if [ $status != "disabled" ]; then
|
||||
/bin/systemctl enable clickhouse-server
|
||||
fi
|
||||
else
|
||||
# If you downgrading to version older than 1.1.54336 run: systemctl disable clickhouse-server
|
||||
if [ -x "/etc/init.d/clickhouse-server" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user