From a7e0c81a31f5cbafaeaf97dab7f08caadadd1257 Mon Sep 17 00:00:00 2001
From: lgq <1015864684@qq.com>
Date: 星期六, 19 七月 2025 11:02:32 +0800
Subject: [PATCH] 1.同步最新文件
---
local/bin/export.sh | 4 ++--
local/bin/snmp_val.sh | 7 +++----
local/www/cgi-bin/snmp/enable | 2 +-
local/default/app.ini | 2 +-
local/www/cgi-bin/warn-list/clear | 18 +++++++++++++++++-
local/www/js/page/home.js | 2 +-
local/www/cgi-bin/device-ctrl/reboot-service | 2 ++
new_board_upgrade/upgrade/app.tgz | 0
local/app/MainControl | 0
local/version | 2 +-
upgrade/app.tgz | 0
local/app/NetModule | 0
12 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/local/app/MainControl b/local/app/MainControl
index f26c3f6..d38f24a 100755
--- a/local/app/MainControl
+++ b/local/app/MainControl
Binary files differ
diff --git a/local/app/NetModule b/local/app/NetModule
index 33ccf3b..e522398 100755
--- a/local/app/NetModule
+++ b/local/app/NetModule
Binary files differ
diff --git a/local/bin/export.sh b/local/bin/export.sh
index ce746be..a8e414e 100755
--- a/local/bin/export.sh
+++ b/local/bin/export.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-sqlite3 /work/iot_cfg.db ".headers on " "select d.name as 璁惧鍚嶇О,'1.3.6.1.4.1.27116.'||d.type||'.'||d.id||'.'||a.passcode as OID, d.id as 璁惧ID, d.type as 璁惧绫诲瀷, a.passcode as 閫氶亾鍙�, a.name as 鏁版嵁鍚嶇О,a.note as 澶囨敞 from device d left join accuracy a on d.id=a.id where uploadFlag=0" > /tmp/oid_list.csv
-sqlite3 /work/iot_cfg.db "SELECT name as 璁惧鍚嶇О, '1.3.6.1.4.1.27116.'||type||'.'||id||'.3' as OID, id as 璁惧ID, type as 璁惧绫诲瀷, 3 as 閫氶亾鍙� , '鐘舵��' as 鏁版嵁鍚嶇О, '0-姝e父;1-鍛婅' as 澶囨敞 FROM ioDevice ;" >> /tmp/oid_list.csv
+sqlite3 /work/iot_cfg.db ".headers on " "select d.name as 璁惧鍚嶇О,'1.3.6.1.4.1.27116.'||d.type||'.'||d.id||'.'||a.passcode as OID, d.id as 璁惧ID, a.passcode as 閫氶亾鍙�, a.name as 鏁版嵁鍚嶇О,a.note as 澶囨敞 from device d left join accuracy a on d.id=a.id where uploadFlag=0" > /tmp/oid_list.csv
+sqlite3 /work/iot_cfg.db "SELECT name as 璁惧鍚嶇О, '1.3.6.1.4.1.27116.'||type||'.'||id||'.3' as OID, id as 璁惧ID, 3 as 閫氶亾鍙� , '鐘舵��' as 鏁版嵁鍚嶇О, '0-姝e父;1-鍛婅' as 澶囨敞 FROM ioDevice ;" >> /tmp/oid_list.csv
sed -i 's/|/,/g' /tmp/oid_list.csv
diff --git a/local/bin/snmp_val.sh b/local/bin/snmp_val.sh
index d09feb4..74115c5 100755
--- a/local/bin/snmp_val.sh
+++ b/local/bin/snmp_val.sh
@@ -5,7 +5,6 @@
# 鑾峰彇浼犲叆鐨� OID
OID="$1"
-jsoner=./jsoner
#echo "鑴氭湰琚皟鐢�, OID: $OID"
chn=${OID##*.}
@@ -16,8 +15,8 @@
chn=`expr $chn - 1 `
-#echo "$jsoner -g /tmp/$id value-$chn.value"
-val=`$jsoner -g /tmp/$id value-$chn.value`
+#echo "jsoner -g /tmp/$id value-$chn.value"
+val=`jsoner -g /tmp/$id value-$chn.value`
ret=$?
#echo "ret = $ret"
@@ -30,4 +29,4 @@
# 榛樿杩斿洖
RESPONSE="{\"type\": \"OctetString\", \"value\": \"noData\"}"
echo "$RESPONSE"
-fi
\ No newline at end of file
+fi
diff --git a/local/default/app.ini b/local/default/app.ini
index a14d178..6ebbe1c 100644
--- a/local/default/app.ini
+++ b/local/default/app.ini
@@ -9,5 +9,5 @@
mul=MulticastIP
lk=linkage
rtsp=rtsp
-export applist=" $main $dc $net $gate $svr $lk"
+export applist=" $main $dc $net $gate $svr $lk $mul start_snmpd"
diff --git a/local/version b/local/version
index 01706f8..7957ead 100644
--- a/local/version
+++ b/local/version
@@ -1,3 +1,3 @@
-2025-07-09-v001
+2025-07-18-v001
type=1
IGD3000
diff --git a/local/www/cgi-bin/device-ctrl/reboot-service b/local/www/cgi-bin/device-ctrl/reboot-service
index c0c00bf..d1fedaa 100755
--- a/local/www/cgi-bin/device-ctrl/reboot-service
+++ b/local/www/cgi-bin/device-ctrl/reboot-service
@@ -12,4 +12,6 @@
killall -9 MainControl
killall -9 svr
+`/usr/local/bin/export.sh` > /dev/null
+killall -9 snmpd
diff --git a/local/www/cgi-bin/snmp/enable b/local/www/cgi-bin/snmp/enable
index 7e0cc76..f9efacf 100755
--- a/local/www/cgi-bin/snmp/enable
+++ b/local/www/cgi-bin/snmp/enable
@@ -15,8 +15,8 @@
if [ "$enable" == "true" ]
then
+ `/usr/local/bin/export.sh` > /dev/null
`jsoner -s /work/sysConfig.json snmp "1"` > /dev/null
-
else
`jsoner -s /work/sysConfig.json snmp "0"` > /dev/null
fi
diff --git a/local/www/cgi-bin/warn-list/clear b/local/www/cgi-bin/warn-list/clear
index f4397af..f4becee 100755
--- a/local/www/cgi-bin/warn-list/clear
+++ b/local/www/cgi-bin/warn-list/clear
@@ -6,6 +6,22 @@
echo "{\"code\": \"success\"}"
-echo 0 > /usr/local/dev/do1
+# echo 0 > /usr/local/dev/do1
+# 鍘熷瀛楃涓�
+str=`sqlite3 /work/iot_cfg.db "select alarm from alarm;"`
+# 绉婚櫎閫楀彿锛岀敓鎴愯繛缁瓧绗﹀簭鍒�
+clean_str=${str//,/}
+
+# 闇�瑕佹鏌ョ殑浣嶇疆鍒楄〃锛�1銆�3銆�5銆�7锛�
+positions="0 1 2 3" # 绱㈠紩浠�0寮�濮嬶紝瀵瑰簲绗�1銆�3銆�5銆�7涓瓧绗�
+
+# 閬嶅巻浣嶇疆骞跺垽鏂�
+for pos in $positions; do
+ char="${clean_str:$pos:1}" # 鎻愬彇鎸囧畾浣嶇疆鐨勫瓧绗�
+ if [[ "$char" == "1" ]]; then
+ actual_pos=$((pos + 1)) # 杞崲涓哄疄闄呬綅缃紙浠�1璁℃暟锛�
+ echo 0 > /usr/local/dev/do$actual_pos
+ fi
+done
\ No newline at end of file
diff --git a/local/www/js/page/home.js b/local/www/js/page/home.js
index 000ef35..2671bb5 100644
--- a/local/www/js/page/home.js
+++ b/local/www/js/page/home.js
@@ -291,7 +291,7 @@
var data = warnList;
var html = '';
if (data != null && data.length > 0) {
- for (var i = data.length - 1; i > data.length - 12; i--) {
+ for (var i = data.length - 1; i > data.length - 6; i--) {
if(i < 0){
break;
}
diff --git a/new_board_upgrade/upgrade/app.tgz b/new_board_upgrade/upgrade/app.tgz
index 305db48..4fa1180 100644
--- a/new_board_upgrade/upgrade/app.tgz
+++ b/new_board_upgrade/upgrade/app.tgz
Binary files differ
diff --git a/upgrade/app.tgz b/upgrade/app.tgz
index 305db48..4fa1180 100644
--- a/upgrade/app.tgz
+++ b/upgrade/app.tgz
Binary files differ
--
Gitblit v1.9.3