NPC 安装到系统服务失败 BUG

This commit is contained in:
yisier
2026-08-08 15:05:29 +08:00
parent 7231be3944
commit f91156a0cb
6 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# NPS
![Version](https://img.shields.io/badge/version-v0.26.36-blue)
![Version](https://img.shields.io/badge/version-v0.26.37-blue)
![License](https://img.shields.io/badge/license-GPL--3.0-green)
![Go](https://img.shields.io/badge/Go-%3E%3D1.22-00ADD8?logo=go)
+1 -1
View File
@@ -1,5 +1,5 @@
#/bash/sh
export VERSION=0.26.33
export VERSION=0.26.37
export GOPROXY=direct
sudo apt-get update
+1 -1
View File
@@ -14,7 +14,7 @@
},
"info": {
"productName": "NPS Client",
"productVersion": "0.26.33",
"productVersion": "0.26.37",
"companyName": "NPS",
"copyright": "Copyright © 2026 NPS"
},
+4
View File
@@ -1,4 +1,8 @@
# 更新日志
- 2026-08-08 v0.26.37
- 修复:
- NPC 安装到系统服务失败 BUG [#338](https://github.com/yisier/nps/issues/338)
- 2026-07-12 v0.26.36
- 新增:
- 新增客户端内网地址上报功能,客户端列表展示 npc 内网地址 [#333](https://github.com/yisier/nps/issues/333)
+7
View File
@@ -407,6 +407,13 @@ func replaceExecutable(srcBin, destBin string) error {
if _, err := os.Stat(srcBin); err != nil {
return fmt.Errorf("源文件不存在: %s: %w", srcBin, err)
}
if dstFi, err := os.Stat(destBin); err == nil {
if srcFi, err := os.Stat(srcBin); err == nil {
if os.SameFile(srcFi, dstFi) {
return nil
}
}
}
if err := os.MkdirAll(filepath.Dir(destBin), 0755); err != nil {
return err
}
+1 -1
View File
@@ -1,6 +1,6 @@
package version
const VERSION = "0.26.36"
const VERSION = "0.26.37"
// Compulsory minimum version, Minimum downward compatibility to this version
func GetVersion() string {