#!/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
|
|