Added task SetupCloudOptions

This commit is contained in:
Paulo Truta
2021-06-21 16:05:26 +00:00
parent 3b3010c8f0
commit bff0f6f817
3 changed files with 51 additions and 4 deletions
+15 -4
View File
@@ -281,11 +281,17 @@ func ExecuteSchedules(tick int) {
hostname := taskGetHostname()
log.Println("Hostname is " + hostname)
if diagnostics.Version == "cloud" && !edgeapps.IsPublicDashboard() {
taskEnablePublicDashboard(taskEnablePublicDashboardArgs{
InternetURL: hostname + ".myedge.app",
})
// if diagnostics.Version == "cloud" && !edgeapps.IsPublicDashboard() {
// taskEnablePublicDashboard(taskEnablePublicDashboardArgs{
// InternetURL: hostname + ".myedge.app",
// })
// }
if diagnostics.Version == "cloud" {
log.Println("Setting up cloud version options (name, email, api token)")
taskSetupCloudOptions()
}
// Executing on startup (first tick). Schedules run before tasks in the SystemIterator
uptime := taskGetSystemUptime()
@@ -467,3 +473,8 @@ func taskGetHostname() string {
utils.WriteOption("HOSTNAME", hostname)
return hostname
}
func taskSetupCloudOptions() {
fmt.Println("Executing taskSetupCloudOptions")
system.SetupCloudOptions()
}