From 3aea945277b457969801db52b1378bace799c32f Mon Sep 17 00:00:00 2001 From: LinkLeong Date: Mon, 11 Sep 2023 04:22:08 +0100 Subject: [PATCH 1/5] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 42615e6..964eba2 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Furthermore, the personal cloud could combine personal data to train personalize - Multiple hardware and base system support - ZimaBoard, NUC, RPi, old computers, whatever is available. - Selected apps in the app store, one-click installation - - Nextcloud, HomeAssiant, AdGuard, Jellyfin, *arr and more! + - Nextcloud, HomeAssistant, AdGuard, Jellyfin, *arr and more! - Easily install numerous Docker apps - Over 100,000 apps from the Docker ecosystem can be easily installed - Elegant drive and file management From fa62c65526bad10426756b988e32941cf5bd4e47 Mon Sep 17 00:00:00 2001 From: LinkLeong Date: Mon, 11 Sep 2023 09:39:50 +0100 Subject: [PATCH 2/5] add amd cpu suport --- route/init.go | 2 +- service/system.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/route/init.go b/route/init.go index 70d2628..e90f895 100644 --- a/route/init.go +++ b/route/init.go @@ -33,7 +33,7 @@ import ( func InitFunction() { go InitNetworkMount() go InitInfo() - go InitZerotier() + //go InitZerotier() } func InitInfo() { diff --git a/service/system.go b/service/system.go index e307a4b..a830c42 100644 --- a/service/system.go +++ b/service/system.go @@ -473,6 +473,7 @@ func GetCPUThermalZone() string { break } } + Cache.SetDefault(keyName, path) return path } @@ -483,7 +484,10 @@ func (s *systemService) GetCPUTemperature() int { if len(path) > 0 { outPut = string(file.ReadFullFile(path + "/temp")) } else { - outPut = "0" + outPut = string(file.ReadFullFile("/sys/class/hwmon/hwmon0/temp1_input")) + if len(outPut) == 0 { + outPut = "0" + } } celsius, _ := strconv.Atoi(strings.TrimSpace(outPut)) From 9e5381710f46c5aae29c0c6aeeb9328e6949f4fd Mon Sep 17 00:00:00 2001 From: LinkLeong Date: Tue, 12 Sep 2023 09:16:18 +0100 Subject: [PATCH 3/5] update file task --- service/file.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/service/file.go b/service/file.go index 049994a..2eab5f0 100644 --- a/service/file.go +++ b/service/file.go @@ -102,16 +102,20 @@ func FileOperate(k string) { os.RemoveAll(temp.To + "/" + lastPath) } } - err := os.Rename(v.From, temp.To+"/"+lastPath) - if err != nil { - logger.Error("file move error", zap.Any("err", err)) - err = file.MoveFile(v.From, temp.To+"/"+lastPath) + err := file.CopyDir(v.From, temp.To, temp.Style) + if err == nil { + err = os.RemoveAll(v.From) if err != nil { - logger.Error("MoveFile error", zap.Any("err", err)) - continue - } + logger.Error("file move error", zap.Any("err", err)) + err = file.MoveFile(v.From, temp.To+"/"+lastPath) + if err != nil { + logger.Error("MoveFile error", zap.Any("err", err)) + continue + } + } } + } else if temp.Type == "copy" { err := file.CopyDir(v.From, temp.To, temp.Style) if err != nil { From 7807cfdb01d00dc4ea20a3358ff1fbc33724d75a Mon Sep 17 00:00:00 2001 From: LinkLeong Date: Fri, 22 Sep 2023 10:03:34 +0100 Subject: [PATCH 4/5] updat version --- common/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/constants.go b/common/constants.go index 8aea75f..885538f 100644 --- a/common/constants.go +++ b/common/constants.go @@ -2,7 +2,7 @@ package common const ( SERVICENAME = "casaos" - VERSION = "0.4.4.2" + VERSION = "0.4.4.3" BODY = " " RANW_NAME = "IceWhale-RemoteAccess" ) From b17bff68dde1e9d7cf041a3173f20f03f23232a0 Mon Sep 17 00:00:00 2001 From: Liviu <108449432+livghit@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:35:17 +0200 Subject: [PATCH 5/5] Added small description on th casosapi health and file sys (#1417) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🐙 Hi , hope the small description is oke ! :) --- api/casaos/openapi.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/api/casaos/openapi.yaml b/api/casaos/openapi.yaml index 2f77350..426db31 100644 --- a/api/casaos/openapi.yaml +++ b/api/casaos/openapi.yaml @@ -20,10 +20,11 @@ servers: tags: - name: Health methods description: |- - (TODO) - - name: File methods + These methods are used to check the health and status of the CasaOS API and associated services. + + - name: File methods description: |- - (TODO) + The File methods allow you to interact with files and directories on the CasaOS system. x-tagGroups: - name: Methods @@ -232,4 +233,4 @@ components: example: "CasaOS" status: type: string - example: "online" \ No newline at end of file + example: "online"