mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-06-16 05:55:33 +00:00
add update url
This commit is contained in:
parent
46a37f0510
commit
c05d837350
@ -26,6 +26,7 @@ type ServerModel struct {
|
|||||||
Token string
|
Token string
|
||||||
USBAutoMount string
|
USBAutoMount string
|
||||||
SocketPort string
|
SocketPort string
|
||||||
|
UpdateUrl string
|
||||||
}
|
}
|
||||||
|
|
||||||
// 服务配置
|
// 服务配置
|
||||||
|
@ -221,7 +221,12 @@ func (s *systemService) UpdateSystemVersion(version string) {
|
|||||||
}
|
}
|
||||||
file.CreateFile(config.AppInfo.LogPath + "/upgrade.log")
|
file.CreateFile(config.AppInfo.LogPath + "/upgrade.log")
|
||||||
//go command2.OnlyExec("curl -fsSL https://raw.githubusercontent.com/LinkLeong/casaos-alpha/main/update.sh | bash")
|
//go command2.OnlyExec("curl -fsSL https://raw.githubusercontent.com/LinkLeong/casaos-alpha/main/update.sh | bash")
|
||||||
|
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://raw.githubusercontent.com/IceWhaleTech/get/main/update.sh | bash")
|
||||||
|
}
|
||||||
|
|
||||||
//s.log.Error(config.AppInfo.ProjectPath + "/shell/tool.sh -r " + version)
|
//s.log.Error(config.AppInfo.ProjectPath + "/shell/tool.sh -r " + version)
|
||||||
//s.log.Error(command2.ExecResultStr(config.AppInfo.ProjectPath + "/shell/tool.sh -r " + version))
|
//s.log.Error(command2.ExecResultStr(config.AppInfo.ProjectPath + "/shell/tool.sh -r " + version))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user