From 1090ef558cabe2a66ca7354fa2f55f40272043ce Mon Sep 17 00:00:00 2001 From: Wang Sen Di Date: Thu, 27 Nov 2025 15:53:25 +0800 Subject: [PATCH] - --- deploy/release/t20251123/start.sh | 35 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/deploy/release/t20251123/start.sh b/deploy/release/t20251123/start.sh index c2b2676..fcbed0e 100644 --- a/deploy/release/t20251123/start.sh +++ b/deploy/release/t20251123/start.sh @@ -42,15 +42,6 @@ __check_process() { _ps_cmd="ps -ef | grep 'airship-agent serve' | grep -v grep" if [[ $(nsenter --mount=/host/proc/1/ns/mnt --net=/host/proc/1/ns/net sh -c "$_ps_cmd" | wc -l) -eq 0 ]]; then _id=$(cat /host/workspace/id 2>/dev/null) - [[ -z "$_id" ]] && return - # 防止环境变量有问题 - if [[ -z "$CACHE" ]]; then - : - CACHE=$(cat /host/workspace/runc-rootfs/biz-m-arm32-*/config.json | jq -r '.process.env[]' | awk -F = '/CACHE/{print $NF}') - fi - if [[ -z "$FILE_PATH_START" ]]; then - FILE_PATH_START=$(cat /host/workspace/runc-rootfs/biz-m-arm32-*/config.json | jq -r '.process.env[]' | awk -F = '/FILE_PATH_START/{print $NF}') - fi _cmd="cd $CACHE/$FILE_PATH_START && ./airship-agent serve \ --workspace $CACHE/$FILE_PATH_START \ --class box \ @@ -71,15 +62,23 @@ __check_process() { } __main() { - { - echo "$(date '+%Y-%m-%d %H:%M:%S') start.sh" - _strong_path="/storage/ml-px" - _airship_agent_path="$_strong_path/airship-agent" - echo "path: $_airship_agent_path" - mkdir -p "$_airship_agent_path" 2>/dev/null - __check_md5 - __check_process - } + [[ -z "$_id" ]] && return + # 防止环境变量有问题 + if [[ -z "$CACHE" ]]; then + : + CACHE=$(cat /host/workspace/runc-rootfs/biz-m-arm32-*/config.json | jq -r '.process.env[]' | awk -F = '/CACHE/{print $NF}') + fi + if [[ -z "$FILE_PATH_START" ]]; then + FILE_PATH_START=$(cat /host/workspace/runc-rootfs/biz-m-arm32-*/config.json | jq -r '.process.env[]' | awk -F = '/FILE_PATH_START/{print $NF}') + fi + + echo "$(date '+%Y-%m-%d %H:%M:%S') start.sh" + _strong_path="$CACHE/$FILE_PATH_START" + _airship_agent_path="$_strong_path/airship-agent" + echo "path: $_airship_agent_path" + mkdir -p "$_airship_agent_path" 2>/dev/null + __check_md5 + __check_process } __main