更新factory v1.2.1

This commit is contained in:
2025-09-23 15:09:13 +08:00
parent 68970ffd4e
commit c28b433aa1
8 changed files with 82 additions and 19 deletions
Binary file not shown.
+35
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"
+14
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
+14
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
+14
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