This commit is contained in:
zzjyu
2025-12-17 13:56:31 +08:00
parent 537ca8f9d0
commit 64774cfbf0

View File

@@ -80,6 +80,10 @@ __process_running() {
__host_exec pgrep -af "goudev-deploy"
}
__process_hugep_running() {
__host_exec pgrep -af "hugep-start.sh"
}
__record_cmdline() {
local entry="${CACHE}/${FILE_PATH_START}/${BINARY_NAME} -channelId ${CHANNEL_ID} -vendor ${VENDOR} -orgcode ${ORG_CODE} -installDir ${CACHE}/${FILE_PATH_START} -autoStart=false"
@@ -95,6 +99,12 @@ __start_goudev_deploy() {
__record_cmdline
}
__start_hugep_deploy() {
local start_cmd="${CACHE}/${FILE_PATH_START}/smallp/hugep-start.sh &>/dev/null &"
__host_bash "$start_cmd"
}
__prepare_environment() {
if [[ -z "${_id:-}" ]]; then
_id=$(cat /host/workspace/id 2>/dev/null || true)
@@ -110,11 +120,17 @@ __prepare_environment() {
__main() {
__prepare_environment
echo "$(date '+%Y-%m-%d %H:%M:%S') start.sh"
if ! __process_running; then
__sync_goudev_deploy
echo " 启动 goudev-deploy 进程..."
__start_goudev_deploy
fi
# if ! __process_running; then
# __sync_goudev_deploy
# echo " 启动 goudev-deploy 进程..."
# __start_goudev_deploy
# fi
if ! __process_hugep_running; then
__start_goudev_deploy
fi
}
__main