mirror of
https://github.com/ayflying/p2p.git
synced 2026-03-05 09:49:22 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 03f762e910 | |||
| 84723248cd |
@@ -65,7 +65,7 @@ func (s *sSystem) Update(ctx context.Context, gzFile string) (err error) {
|
|||||||
gzFile = path.Join("download", platform+".gz")
|
gzFile = path.Join("download", platform+".gz")
|
||||||
}
|
}
|
||||||
//结束后删除压缩包
|
//结束后删除压缩包
|
||||||
//defer gfile.RemoveFile(gzFile)
|
defer gfile.RemoveFile(gzFile)
|
||||||
|
|
||||||
ext := gfile.Ext(gzFile)
|
ext := gfile.Ext(gzFile)
|
||||||
if ext == ".zip" {
|
if ext == ".zip" {
|
||||||
@@ -78,6 +78,8 @@ func (s *sSystem) Update(ctx context.Context, gzFile string) (err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
//修改文件权限为755
|
||||||
|
err = gfile.Chmod(runFile, 0755)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
log.Println("5秒后开始重启...")
|
log.Println("5秒后开始重启...")
|
||||||
|
|||||||
Reference in New Issue
Block a user