diff --git a/docker-compose.yml b/docker-compose.yml index 769a8d6..f630c51 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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" ] diff --git a/yuzhen_iot/prod_manage/app/Version-1.2.1 b/yuzhen_iot/prod_manage/app/Version-1.2.1 new file mode 100644 index 0000000..e69de29 diff --git a/yuzhen_iot/prod_manage/app/factory b/yuzhen_iot/prod_manage/app/factory index 2fcb38b..bc3920a 100755 Binary files a/yuzhen_iot/prod_manage/app/factory and b/yuzhen_iot/prod_manage/app/factory differ diff --git a/yuzhen_iot/prod_manage/app/update.sh b/yuzhen_iot/prod_manage/app/update.sh new file mode 100755 index 0000000..ca62470 --- /dev/null +++ b/yuzhen_iot/prod_manage/app/update.sh @@ -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" diff --git a/yuzhen_iot/prod_manage/app/yz-frpc.service b/yuzhen_iot/prod_manage/app/yz-frpc.service new file mode 100755 index 0000000..5dd7bb5 --- /dev/null +++ b/yuzhen_iot/prod_manage/app/yz-frpc.service @@ -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 diff --git a/yuzhen_iot/prod_manage/app/yz-gotty.service b/yuzhen_iot/prod_manage/app/yz-gotty.service new file mode 100755 index 0000000..eea7a9c --- /dev/null +++ b/yuzhen_iot/prod_manage/app/yz-gotty.service @@ -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 diff --git a/yuzhen_iot/prod_manage/app/yz-npc.service b/yuzhen_iot/prod_manage/app/yz-npc.service new file mode 100755 index 0000000..80a5e31 --- /dev/null +++ b/yuzhen_iot/prod_manage/app/yz-npc.service @@ -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 diff --git a/yz_project.csv b/yz_project.csv index a7fc65a..80e7ca3 100644 --- a/yz_project.csv +++ b/yz_project.csv @@ -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,,,