From 8956279255c7a80ef319d68d65bd0f3e0fcd8c7d Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Fri, 20 Dec 2024 12:38:41 +0800 Subject: [PATCH] [chore](script) fix `start_fe.sh --version` not work and MetaService scripts occur error in Debian GNU/Linux 11 (bullseye) (#45610) 1. fix `start_fe.sh --version` not work 2. fix `ms/bin/start.sh` could not work in Debian GNU/Linux 11 (bullseye) --- bin/start_fe.sh | 6 ++++++ cloud/script/start.sh | 2 +- cloud/script/stop.sh | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/start_fe.sh b/bin/start_fe.sh index ac5971072c306c..b089596a9cdb73 100755 --- a/bin/start_fe.sh +++ b/bin/start_fe.sh @@ -258,6 +258,12 @@ if [[ "${HELPER}" != "" ]]; then HELPER="-helper ${HELPER}" fi +if [[ "${OPT_VERSION}" != "" ]]; then + export DORIS_LOG_TO_STDERR=1 + ${LIMIT:+${LIMIT}} "${JAVA}" org.apache.doris.DorisFE --version + exit 0 +fi + if [[ "${IMAGE_TOOL}" -eq 1 ]]; then if [[ -n "${IMAGE_PATH}" ]]; then ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} ${coverage_opt:+${coverage_opt}} org.apache.doris.DorisFE -i "${IMAGE_PATH}" diff --git a/cloud/script/start.sh b/cloud/script/start.sh index 1bce9813f4cf52..ecb5a3b2bed1e6 100644 --- a/cloud/script/start.sh +++ b/cloud/script/start.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/usr/bin/env bash # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information diff --git a/cloud/script/stop.sh b/cloud/script/stop.sh index 48f01c545ae840..1b59cef718243e 100644 --- a/cloud/script/stop.sh +++ b/cloud/script/stop.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/usr/bin/env bash # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information