更新factory v1.2.1

This commit is contained in:
liu.chunxun 2025-09-23 15:09:13 +08:00
parent 68970ffd4e
commit c28b433aa1
8 changed files with 82 additions and 19 deletions

View File

@ -1,16 +1,12 @@
version: '3'
x-service-common: &service-common
image: gitiot.mgm-iot.com/iot_images/yuzhen_base:v1.0.7
image: gitiot.mgm-iot.com/iot_images/yuzhen_base:v1.0.9
restart: always
volumes:
- ./yz_project.csv:/home/yz_project.csv
services:
YZXHRC0124L200001:
YZXHRC0125H070001:
<<: *service-common
command: [ "/home/start.sh", "YZXHRC0124L200001" ]
YZXHRC0124L200002:
<<: *service-common
command: [ "/home/start.sh", "YZXHRC0124L200002" ]
command: [ "/home/start.sh", "YZXHRC0125H070001" ]

View File

Binary file not shown.

View File

@ -0,0 +1,35 @@
#!/bin/bash
systemctl stop yz-frpc.service
systemctl stop yz-npc.service
systemctl stop yz-gotty.service
systemctl stop yz-ttyd.service
cp -f /yuzhen_iot/prod_manage/update/{factory,npc,frpc,plumber,gotty,ttyd,Version} /yuzhen_iot/prod_manage/app/
cp -f /yuzhen_iot/prod_manage/update/yz-frpc.service /lib/systemd/system
cp -f /yuzhen_iot/prod_manage/update/yz-npc.service /lib/systemd/system
cp -f /yuzhen_iot/prod_manage/update/yz-gotty.service /lib/systemd/system
cp -f /yuzhen_iot/prod_manage/update/yz-ttyd.service /lib/systemd/system
if [ "$1" == "factory" ]; then
echo "Factory"
cp /yuzhen_iot/prod_manage/update/{Prod_connect.json,gotty.conf} /yuzhen_iot/prod_manage/cfg/
elif [ "$1" == "update" ]; then
echo "Update"
fi
/yuzhen_iot/prod_manage/update/cfgFRPc
sync
systemctl enable yz-frpc.service
systemctl start yz-frpc.service
systemctl enable yz-npc.service
systemctl start yz-npc.service
systemctl enable yz-gotty.service
systemctl start yz-gotty.service
systemctl enable yz-ttyd.service
systemctl start yz-ttyd.service
echo "updata factory done"

View File

@ -0,0 +1,14 @@
[Unit]
Description = yz-frpc
After = ssh.service
[Service]
Type = simple
WorkingDirectory = /yuzhen_iot/prod_manage/app
ExecStart = /yuzhen_iot/prod_manage/app/frpc -c /yuzhen_iot/prod_manage/cfg/frpc.ini
StartLimitIntervalSec=0
Restart=always
RestartSec=1
[Install]
WantedBy = multi-user.target

View File

@ -0,0 +1,14 @@
[Unit]
Description = yz-gotty
After = ssh.service
[Service]
Type = simple
WorkingDirectory = /yuzhen_iot/prod_manage/app
ExecStart = /yuzhen_iot/prod_manage/app/gotty --config=/yuzhen_iot/prod_manage/cfg/gotty.conf /yuzhen_iot/prod_manage/app/plumber
StartLimitIntervalSec=0
Restart=always
RestartSec=1
[Install]
WantedBy = multi-user.target

View File

@ -0,0 +1,14 @@
[Unit]
Description = yz-npc
After = ssh.service
[Service]
Type = simple
WorkingDirectory = /yuzhen_iot/prod_manage/app
ExecStart = /yuzhen_iot/prod_manage/app/npc -config=/yuzhen_iot/prod_manage/cfg/npc.conf
StartLimitIntervalSec=0
Restart=always
RestartSec=1
[Install]
WantedBy = multi-user.target

View File

@ -1,13 +1,3 @@
hardware_sn,hardware_mode,hardware_ver,uiot_addr,uiot_port,uiot_name,uiot_key,uiot_authmode,ntp_host,register_url ,frp_server_addr,frp_server_port
,,,,,,,,,,,
${device_SN},Horseman-A21,H21.0.0.1,106.75.75.68,1883,mxpoty5rco1jhwde|${device_SN}|2,pykqg5qpzspfce3w,0,106.75.75.68,,,
YZXHRA21A0321H160451,Horseman-A21,H21.0.0.1,124.70.13.110,1883,zzhtn1urep3vmvpv|YZXHRA21A0321H160451|1,c4bae55ep4ijnx49,0, cn.pool.ntp.org,,,
00257C30DD3A,Horseman-A21,H25.0.0.1,iot.yuzhen-iot.com,1883,k4nof78df3lxmd53|00257C30DD3A|2,bgldgnqgtjxglfp3,0,cn.pool.ntp.org,http://124.70.108.207:8080/dlp/v1/device/backupAndRestore,,
,,,,,,,,,,,
YZXHRA11102209160196,Horseman-A11,H11.0.0.1,106.75.75.68,1883,69g17ocen1v22o04|YZXHRA11102209160196|2,wlfnt3cqjby16ogs,0,106.75.75.68,,,
YZXHRC0124L200001,Horseman-A21,H21.0.0.1,106.75.75.68,1883,4qgg2nqa4nrbr460|YZXHRC0124L200001|2,5ndyltmefxnlj8iz,0,106.75.75.68,,,
YZXHRC0124L200002,Horseman-A21,H21.0.0.1,106.75.75.68,1883,4qgg2nqa4nrbr460|YZXHRC0124L200002|2,5ndyltmefxnlj8iz,0,106.75.75.68,,,
YZXHRC0125H070001,Horseman-A21,H21.0.0.1,106.75.75.68,1883,mxpoty5rco1jhwde|YZXHRC0125H070001|2,"pykqg5qpzspfce3w
",0,106.75.75.68,,,

1 hardware_sn hardware_mode hardware_ver uiot_addr uiot_port uiot_name uiot_key uiot_authmode ntp_host register_url frp_server_addr frp_server_port
2 YZXHRC0125H070001 Horseman-A21 H21.0.0.1 106.75.75.68 1883 mxpoty5rco1jhwde|YZXHRC0125H070001|2 pykqg5qpzspfce3w 0 106.75.75.68
3
YZXHRA21A0321H160451 Horseman-A21 H21.0.0.1 124.70.13.110 1883 zzhtn1urep3vmvpv|YZXHRA21A0321H160451|1 c4bae55ep4ijnx49 0 cn.pool.ntp.org
00257C30DD3A Horseman-A21 H25.0.0.1 iot.yuzhen-iot.com 1883 k4nof78df3lxmd53|00257C30DD3A|2 bgldgnqgtjxglfp3 0 cn.pool.ntp.org http://124.70.108.207:8080/dlp/v1/device/backupAndRestore
YZXHRA11102209160196 Horseman-A11 H11.0.0.1 106.75.75.68 1883 69g17ocen1v22o04|YZXHRA11102209160196|2 wlfnt3cqjby16ogs 0 106.75.75.68
YZXHRC0124L200001 Horseman-A21 H21.0.0.1 106.75.75.68 1883 4qgg2nqa4nrbr460|YZXHRC0124L200001|2 5ndyltmefxnlj8iz 0 106.75.75.68
YZXHRC0124L200002 Horseman-A21 H21.0.0.1 106.75.75.68 1883 4qgg2nqa4nrbr460|YZXHRC0124L200002|2 5ndyltmefxnlj8iz 0 106.75.75.68