#!/bin/sh
# 查询-所有设备列表 包括串口设备、扩展设备、网口设备
echo -en "Content-type: text/html; charset=utf-8\n\n"
#*****************************************************
source ../bin/env.sh

jsoner="../bin/jsoner"

file="/tmp/.debug_mode"

read data

mode=`$jsoner $data mode`

case "$mode" in
debug)
touch $file
if [ -f $file ]
then
	echo "{\"code\": \"success\"}"
else
	echo "{\"code\": \"error\"}"
fi
;;
normal)
rm $file
if [ -f $file ]
then
	echo "{\"code\": \"error\"}"                                     
else                                                                       
        echo "{\"code\": \"success\"}"                                       
fi                                                                         
;;      
esac




