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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
# 端口配置-保存
#
echo -en "Content-type: text/html; charset=utf-8\n\n"
#*****************************************************
source ../bin/env.sh
db="../bin/db"
jsoner="../bin/jsoner"
 
 
 
 
mv /work/data/file.txt /work/data/byte.txt
 
result=`$db upload "/work/data"`
 
rm /work/data/byte.txt
 
name=`$jsoner $result name`
 
 
if [ -e /work/data/$name ]
then
    tar -zxf /work/data/$name -C /tmp/
else
    echo "{\"code\": \"error\"}"
    exit
fi
 
 
rm /work/data/$name
 
cd /tmp/upgrade
 
if [ -e  upgrade.sh ]
then
    echo "{\"code\": \"success\"}"
    msg upgrade 1
else
    echo "{\"code\": \"error\"}"
fi