From 05e0dc712f36a43d15812ad81e61386b3dfb57f2 Mon Sep 17 00:00:00 2001 From: Gibson Chikafa Date: Wed, 11 Dec 2024 09:13:12 +0100 Subject: [PATCH] Add dashboard service to start script --- bin/start-dashboard.sh | 2 +- deploy/kubernetes/docker/start.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/start-dashboard.sh b/bin/start-dashboard.sh index ea2f1f968d..f3d038c9d4 100755 --- a/bin/start-dashboard.sh +++ b/bin/start-dashboard.sh @@ -92,6 +92,6 @@ else fi DASHBOARD_JAVA_OPTS=${DASHBOARD_JAVA_OPTS:-""} -(nohup $RUNNER ${DASHBOARD_BASE_JVM_ARGS} ${DASHBOARD_JVM_GC_ARGS} ${JVM_LOG_ARGS} ${DASHBOARD_JAVA_OPTS} -cp ${CLASSPATH} ${MAIN_CLASS} --conf "${DASHBOARD_CONF_FILE}" $@ > ${LOG_OUT_PATH} 2>&1) & +(nohup $RUNNER ${DASHBOARD_BASE_JVM_ARGS} ${DASHBOARD_JVM_GC_ARGS} ${JVM_LOG_ARGS} ${DASHBOARD_JAVA_OPTS} -cp ${CLASSPATH} ${MAIN_CLASS} --conf "${DASHBOARD_CONF_FILE}" $@ 2>&1 | tee -a ${LOG_OUT_PATH}) & get_pid_file_name dashboard echo $! >${RSS_PID_DIR}/${pid_file} diff --git a/deploy/kubernetes/docker/start.sh b/deploy/kubernetes/docker/start.sh index d2da5d7a5d..c3602897ef 100644 --- a/deploy/kubernetes/docker/start.sh +++ b/deploy/kubernetes/docker/start.sh @@ -58,5 +58,14 @@ fi if [ "$SERVICE_NAME" == "dashboard" ]; then bash ${basedir}/bin/start-dashboard.sh + while : ; do + pid=$(lsof -i:"$DASHBOARD_PORT" -sTCP:LISTEN) + if [ "$pid" = "" ]; then + break + else + echo "dashboard pid:$pid is alive" + sleep 10 + fi + done fi