From efd3017bd306546ea88756efb8815ae4be61e06e Mon Sep 17 00:00:00 2001 From: lgq <1015864684@qq.com> Date: 星期一, 07 七月 2025 11:47:18 +0800 Subject: [PATCH] Merge branch 'master' of http://124.71.187.17:8299/r/~zhd/IGD3000-filesystem --- local/bin/export.sh | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/local/bin/export.sh b/local/bin/export.sh new file mode 100755 index 0000000..51fe1e6 --- /dev/null +++ b/local/bin/export.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +sqlite3 /work/iot_cfg.db ".headers on " "select d.name as 璁惧鍚嶇О,'1.3.6.1.4.1.27116.'||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.'||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 + + +/usr/local/bin/snmp_cfg -f /work/snmp.json /tmp/oid_list.csv -- Gitblit v1.9.3