1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# 2025-05-13:
# 告警批量处理
#
echo -en "Content-type: text/html; charset=utf-8\n\n"
#*****************************************************
source ../bin/env.sh
db="../bin/db"
jsoner="../bin/jsoner"
msg="/usr/sbin/msg"
 
read content
time=`$jsoner "$content" processTime`
note=`$jsoner "$content" note`
 
sqlite3 /work/data/alarm.db "update data set processTime=$time where flag=0" 
sqlite3 /work/data/alarm.db "update data set note=$note where flag=0" 
sqlite3 /work/data/alarm.db "update data set flag=1 where flag=0" 
 
 
if [ $? -eq 0 ]
then
    echo "{\"code\": \"success\"}"  
else 
    echo "{\"code\": \"error\"}" 
fi    
 
#echo "time: $time; note=$note" > log