mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-12-23 13:04:42 +00:00
Compare commits
3 Commits
v0.4.4-alp
...
v0.4.4-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e5381710f | ||
|
|
fa62c65526 | ||
|
|
3aea945277 |
@@ -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
|
||||
|
||||
@@ -33,7 +33,7 @@ import (
|
||||
func InitFunction() {
|
||||
go InitNetworkMount()
|
||||
go InitInfo()
|
||||
go InitZerotier()
|
||||
//go InitZerotier()
|
||||
}
|
||||
|
||||
func InitInfo() {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user