From 60608c5dc7c59314bfedb2dcb4bfe748d7bd4cb6 Mon Sep 17 00:00:00 2001 From: LinkLeong Date: Mon, 21 Nov 2022 11:23:03 +0000 Subject: [PATCH] update update.sh --- service/system.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/service/system.go b/service/system.go index 6b1591d..04de249 100644 --- a/service/system.go +++ b/service/system.go @@ -228,7 +228,7 @@ func (s *systemService) UpdateSystemVersion(version string) { if len(config.ServerInfo.UpdateUrl) > 0 { go command2.OnlyExec("curl -fsSL " + config.ServerInfo.UpdateUrl + " | bash") } else { - go command2.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/update.sh | bash") + go command2.OnlyExec("curl -fsSL https://get.casaos.io/update | bash") } //s.log.Error(config.AppInfo.ProjectPath + "/shell/tool.sh -r " + version) @@ -303,8 +303,8 @@ func (s *systemService) IsServiceRunning(name string) bool { // find thermal_zone of cpu. // assertions: -// * thermal_zone "type" and "temp" are required fields -// (https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-thermal) +// - thermal_zone "type" and "temp" are required fields +// (https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-thermal) func GetCPUThermalZone() string { keyName := "cpu_thermal_zone" @@ -319,7 +319,7 @@ func GetCPUThermalZone() string { for i := 0; i < 100; i++ { path := "/sys/devices/virtual/thermal/thermal_zone" + strconv.Itoa(i) if _, err := os.Stat(path); !os.IsNotExist(err) { - name := strings.TrimSuffix(string(file.ReadFullFile(path + "/type")), "\n") + name := strings.TrimSuffix(string(file.ReadFullFile(path+"/type")), "\n") cpu_types := []string{"x86_pkg_temp", "cpu", "CPU", "soc"} for _, s := range cpu_types { if strings.HasPrefix(name, s) { @@ -339,7 +339,7 @@ func GetCPUThermalZone() string { func (s *systemService) GetCPUTemperature() int { outPut := "" path := GetCPUThermalZone() - if len(path)>0 { + if len(path) > 0 { outPut = string(file.ReadFullFile(path + "/temp")) } else { outPut = "0"