wuwei
2025-06-13 e8c9c0ca7e6c307243c158fd529c59c5a3717f2f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# 查询-串口设备
export PATH=/sbin:/usr/sbin:$PATH
echo -en "Content-type: text/html; charset=utf-8\n\n"
#*****************************************************
source ../bin/env.sh
db="../bin/db"
 
 
#content=`$db query_SN`
#echo "$content"
 
#echo "query device list: $content" >> log
 
tmp=`sqlite3 /work/iot_cfg.db "select id from machine"`
 
if [ "$tmp" = "" ];then
/usr/local/script/update_sn  > /dev/null
fi
 
sn=`sqlite3 /work/iot_cfg.db "select id from machine"`
 
echo "{\"code\": \"success\",\"msg\": \"$sn\"}"