Unpack to another directory

This commit is contained in:
alesapin 2019-09-23 18:57:18 +03:00
parent 87ed508aa4
commit 8c5f8e5fbe

View File

@ -3,13 +3,14 @@
set -x
install_and_run_server() {
tar -xzf package_folder/shared_build.tgz -C package_folder --strip 1
LD_LIBRARY_PATH=/package_folder /package_folder/clickhouse-server --config /package_folder/config/config.xml >/var/log/clickhouse-server/stderr.log 2>&1 &
mkdir /unpacked
tar -xzf /package_folder/shared_build.tgz -C /unpacked --strip 1
LD_LIBRARY_PATH=/unpacked /unpacked/clickhouse-server --config /unpacked/config/config.xml >/var/log/clickhouse-server/stderr.log 2>&1 &
sleep 5
}
run_client() {
LD_LIBRARY_PATH=/package_folder /package_folder/clickhouse-client --query \"select 'OK'\" 2>/var/log/clickhouse-server/clientstderr.log || echo 'FAIL'
LD_LIBRARY_PATH=/unpacked /unpacked/clickhouse-client --query \"select 'OK'\" 2>/var/log/clickhouse-server/clientstderr.log || echo 'FAIL'
}
install_and_run_server