mirror of
https://github.com/edgebox-iot/edgeboxctl.git
synced 2026-09-24 05:41:43 +02:00
Added task SetupCloudOptions
This commit is contained in:
+15
-4
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user