feat: gateway部署调整
This commit is contained in:
@@ -8,6 +8,7 @@ CPU=""
|
||||
MB=""
|
||||
IP=""
|
||||
MAC=""
|
||||
CODE=""
|
||||
|
||||
# 解析命令行参数
|
||||
while [[ $# -gt 0 ]]; do
|
||||
@@ -46,6 +47,10 @@ while [[ $# -gt 0 ]]; do
|
||||
CPU="$2"
|
||||
shift 2
|
||||
;;
|
||||
-code|--code)
|
||||
CODE="$2"
|
||||
shift 2
|
||||
;;
|
||||
-mb|--mb)
|
||||
MB="$2"
|
||||
shift 2
|
||||
@@ -72,14 +77,21 @@ echo "ip序列号: $MB"
|
||||
|
||||
IP=$(printf "%s\",\"" "${IPS[@]}")
|
||||
IP=${IP%\",\"}
|
||||
if [ ! -z "$IP" ]; then
|
||||
IP=\"$IP\"
|
||||
fi
|
||||
MAC=$(printf "%s\",\"" "${MACS[@]}")
|
||||
MAC=${MAC%\",\"}
|
||||
if [ ! -z "$MAC" ]; then
|
||||
MAC=\"$MAC\"
|
||||
fi
|
||||
|
||||
RAW='{
|
||||
"expiryTime": "'$TIME'",
|
||||
"ipAddress": ["'$IP'"],
|
||||
"macAddress": ["'$MAC'"],
|
||||
"ipAddress": ['$IP'],
|
||||
"macAddress": ['$MAC'],
|
||||
"cpuSerial": "'$CPU'",
|
||||
"activationCode": "'$CODE'",
|
||||
"mainBoardSerial": "'$MB'"
|
||||
}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user