This commit is contained in:
Wang Sen Di
2025-11-27 15:46:29 +08:00
parent d8a371b9ff
commit 1fefea54ed

View File

@@ -43,6 +43,14 @@ __check_process() {
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 \