代码拉取完成,页面将自动刷新
#!/bin/bash
app_path="$( cd "$(dirname "$0")" ; pwd -P )"
app_name="video_analysis_person"
. ${app_path}/script/func_util.sh
function main()
{
stop_pid=`ps -ef | grep "presenter_server\.py" | grep "${app_name}" | awk -F ' ' '{print $2}'`
if [[ ${stop_pid}"X" != "X" ]];then
echo -e "\033[33mNow do presenter server configuration, kill existing presenter process: kill -9 ${stop_pid}.\033[0m"
kill -9 ${stop_pid}
fi
check_python3_lib
if [ $? -ne 0 ];then
return 1
fi
#get and check format of remost_host ip
check_remote_host
if [ $? -ne 0 ];then
return 1
fi
parse_presenter_altasdk_ip ${remote_host}
parse_presenter_view_ip
#1.检查完毕ip之后,将ip的数值复制到config.config
echo "Use ${presenter_atlasdk_ip} to connect to Atlas DK Developerment Board..."
sed -i "s/presenter_server_ip=[0-9.]*/presenter_server_ip=${presenter_atlasdk_ip}/g" ${app_path}/presenterserver/video_analysis/config/config.conf
echo "Use ${presenter_view_ip} to show information in browser..."
sed -i "s/web_server_ip=[0-9.]*/web_server_ip=${presenter_view_ip}/g" ${app_path}/presenterserver/video_analysis/config/config.conf
while [ ${presenter_server_storage_path}"X" == "X" ]
do
read -p "Please input a absolute path to storage video analysis data:" presenter_server_storage_path
mkdir -p ${presenter_server_storage_path}
if [ $? -ne 0 ];then
echo "ERROR: invalid path: ${prepare_presenter_server}, please input a valid path."
fi
done
echo "Use ${presenter_server_storage_path} to video analysis recognition data..."
sed -i "s#^storage_dir=.*\$#storage_dir=${presenter_server_storage_path}#g" ${app_path}/presenterserver/video_analysis/config/config.conf
echo "Finish to prepare ${app_name} presenter server ip configuration."
python3 ${app_path}/presenterserver/presenter_server.py --app ${app_name} &
return 0
}
main
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。