#!/bin/sh # 如果映射目录里没有初始化标记文件,说明是初次启动 if [ ! -f "/yuzhen_iot/.initialized" ]; then echo "检测到初次启动,正在释放默认文件..." cp -r /yuzhen_iot_default/. /yuzhen_iot/ touch /yuzhen_iot/.initialized fi echo "start ssh" service ssh start FILE_PATH="/yuzhen_iot/prod_manage/cfg/Prod_connect.json" SEARCH_TERM=$1 if [ -z "$SEARCH_TERM" ]; then echo "使用错误: 请输入要检查的参数。" exit 1 fi if jq -e ".product.user | contains(\"$SEARCH_TERM\")" "$FILE_PATH" > /dev/null; then echo "包含: 字段 'user' 中找到了 '$SEARCH_TERM'" else /yuzhen_iot/prod_manage/app/plumber -project /home/yz_project.csv -S $1 echo "不包含: 字段 'user' 中未找到 '$SEARCH_TERM'" fi echo "start scheduler" /yuzhen_iot/service_manage/manage/app/scheduler echo "yuzhen exit!"