2 Commits

Author SHA1 Message Date
03f762e910 更新完后需要修改文件可执行权限 2025-10-31 10:05:10 +08:00
84723248cd 删除更新的临时压缩包 2025-10-30 19:35:21 +08:00

View File

@@ -65,7 +65,7 @@ func (s *sSystem) Update(ctx context.Context, gzFile string) (err error) {
gzFile = path.Join("download", platform+".gz")
}
//结束后删除压缩包
//defer gfile.RemoveFile(gzFile)
defer gfile.RemoveFile(gzFile)
ext := gfile.Ext(gzFile)
if ext == ".zip" {
@@ -78,6 +78,8 @@ func (s *sSystem) Update(ctx context.Context, gzFile string) (err error) {
if err != nil {
return
}
//修改文件权限为755
err = gfile.Chmod(runFile, 0755)
go func() {
log.Println("5秒后开始重启...")