diff --git a/install/cleanup-clickhouse.sh b/install/cleanup-clickhouse.sh index bbf7e8c2f..9ddfc78d1 100644 --- a/install/cleanup-clickhouse.sh +++ b/install/cleanup-clickhouse.sh @@ -29,7 +29,7 @@ TRUNCATE TABLE IF EXISTS system.query_views_log; " } -if $ps_command | grep -q clickhouse; then +if $ps_command | grep clickhouse >/dev/null; then start_service_and_wait_ready clickhouse drop_clickhouse_system_table_if_exists query_log_0 drop_clickhouse_system_table_if_exists query_views_log_0 diff --git a/install/upgrade-clickhouse.sh b/install/upgrade-clickhouse.sh index 36a29c183..5909a3135 100644 --- a/install/upgrade-clickhouse.sh +++ b/install/upgrade-clickhouse.sh @@ -10,7 +10,7 @@ else build_arg="--build-arg" fi -if $ps_command | grep -q clickhouse; then +if $ps_command | grep clickhouse >/dev/null; then # Start clickhouse if it is not already running start_service_and_wait_ready clickhouse