|
|
@ -32,6 +32,29 @@ start_binaries() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
start_tools() {
|
|
|
|
|
|
|
|
# Assume tool_binaries=("ncpu" "infra")
|
|
|
|
|
|
|
|
for binary in "${tool_binaries[@]}"; do
|
|
|
|
|
|
|
|
local bin_full_path=$(get_tool_full_path "$binary")
|
|
|
|
|
|
|
|
# Assuming get_tool_full_path defines full path for each tool
|
|
|
|
|
|
|
|
cmd=("$bin_full_path" -c "$OPENIM_OUTPUT_CONFIG")
|
|
|
|
|
|
|
|
echo "Starting ${cmd[@]}"
|
|
|
|
|
|
|
|
"${cmd[@]}"
|
|
|
|
|
|
|
|
ret_val=$?
|
|
|
|
|
|
|
|
if [ $ret_val -eq 0 ]; then
|
|
|
|
|
|
|
|
echo "Started $bin_full_path successfully."
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "Failed to start $bin_full_path with exit code $ret_val."
|
|
|
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#kill二进制全路径对应的进程
|
|
|
|
#kill二进制全路径对应的进程
|
|
|
|
kill_exist_binaries(){
|
|
|
|
kill_exist_binaries(){
|
|
|
|
for binary in "${!binaries[@]}"; do
|
|
|
|
for binary in "${!binaries[@]}"; do
|
|
|
|