mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-12-02 04:08:54 +08:00
fix dgiot install htpps faild
This commit is contained in:
parent
c2bfc18348
commit
bcdf049c5b
@ -38,11 +38,16 @@ init(TCPState) ->
|
||||
handle_info({tcp, Buff}, #tcp{socket = Socket, state = #state{id = ChannelId, dtuaddr = <<>>, search = Search} = State} = TCPState) ->
|
||||
?LOG(info,"Buff ~p",[Buff]),
|
||||
DTUIP = dgiot_utils:get_ip(Socket),
|
||||
NewBuff =
|
||||
case is_binary(Buff) of
|
||||
true -> dgiot_utils:binary_to_hex(Buff);
|
||||
false -> Buff
|
||||
end,
|
||||
{Protocol, DtuAddr} =
|
||||
case Buff of
|
||||
<<16#68, _:4/bytes, 16#68,_A1:8/bytes,_Rest/binary>> ->
|
||||
{_, [Acc | _]} = dlt376_decoder:parse_frame(Buff, []),
|
||||
#{<<"msgtype">> := Protocol1,<<"addr">> := MeterAddr} = Acc,
|
||||
{_, [Acc | _]} = dlt376_decoder:parse_frame(NewBuff, []),
|
||||
#{<<"msgtype">> := Protocol1, <<"addr">> := MeterAddr} = Acc,
|
||||
dgiot_meter:create_meter4G(MeterAddr, ChannelId, DTUIP),
|
||||
{Protocol1, MeterAddr};
|
||||
_ ->
|
||||
|
@ -118,7 +118,8 @@
|
||||
<<"os">> => #{
|
||||
order => 7,
|
||||
type => string,
|
||||
default => <<"all">>,
|
||||
default => <<"linux"/utf8>>,
|
||||
enum => [<<"linux">>, <<"windows">>, <<"all">>],
|
||||
title => #{
|
||||
zh => <<"指定操作系统"/utf8>>
|
||||
},
|
||||
|
@ -122,13 +122,13 @@ do
|
||||
dgiot=$(echo $OPTARG)
|
||||
;;
|
||||
d)
|
||||
domain_name=$(echo $OPTARG)
|
||||
echo "Please ensure that the certificate file has been placed in ${script_dir}"
|
||||
echo -e "`date +%F_%T` $LINENO: ${GREEN} Please ensure that the certificate file has been placed in `pwd`${NC}"
|
||||
if [ ! -f ${script_dir}/${domain_name}.zip ]; then
|
||||
echo -e "`date +%F_%T` $LINENO: ${RED} ${script_dir}/${domain_name}.zip cert file not exist ${NC}"
|
||||
exit 1
|
||||
fi
|
||||
domain_name=$(echo $OPTARG)
|
||||
;;
|
||||
h)
|
||||
echo "Usage: `basename $0` -v [single | cluster] -s [dgiot_102 | dgiot_n] -d [prod.iotn2n.com | your_domain_name]"
|
||||
|
Loading…
Reference in New Issue
Block a user