将cluster.yaml修改为api_cluster.yaml

This commit is contained in:
GoEdgeLab
2023-08-12 18:53:32 +08:00
parent cb4d2ab7d7
commit a791630d31
5 changed files with 81 additions and 15 deletions

View File

@@ -37,8 +37,12 @@ func main() {
// validate config
_, err := configs.LoadAPIConfig()
if err != nil {
fmt.Println("[ERROR]start failed: load api config from '" + Tea.ConfigFile(configs.ConfigFileName) + "' failed: " + err.Error())
os.Exit(0)
// validate cluster config
_, clusterErr := configs.LoadClusterConfig()
if clusterErr != nil { // fail again
fmt.Println("[ERROR]start failed: load api config from '" + Tea.ConfigFile(configs.ConfigFileName) + "' failed: " + err.Error())
os.Exit(0)
}
}
})
app.On("uninstall", func() {