mirror of
https://github.com/edgebox-iot/edgeboxctl.git
synced 2026-10-03 01:38:30 +02:00
Compare commits
8
Commits
1.3.0
..
0a660e466f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a660e466f | ||
|
|
a60a41f7f1 | ||
|
|
525c7a8113 | ||
|
|
0e579c19da | ||
|
|
c5cfe4bdbc | ||
|
|
da5da6d0b7 | ||
|
|
664e2c2e7c | ||
|
|
7e42e72bb2 |
@@ -530,7 +530,6 @@ func ExecuteSchedules(tick int) {
|
||||
|
||||
log.Println("Fetching Browser Dev Environment Information")
|
||||
taskGetBrowserDevPassword()
|
||||
taskGetBrowserDevStatus()
|
||||
|
||||
ip := taskGetSystemIP()
|
||||
log.Println("System IP is: " + ip)
|
||||
@@ -609,9 +608,7 @@ func ExecuteSchedules(tick int) {
|
||||
|
||||
if tick%3600 == 0 {
|
||||
// Executing every 3600 ticks (1 hour)
|
||||
taskGetBrowserDevStatus()
|
||||
taskCheckSystemUpdates()
|
||||
|
||||
}
|
||||
|
||||
if tick%86400 == 0 {
|
||||
@@ -1138,26 +1135,6 @@ func taskStopShell() string {
|
||||
|
||||
}
|
||||
|
||||
func taskGetBrowserDevStatus() string {
|
||||
fmt.Println("Executing taskGetBrowserDevStatus")
|
||||
|
||||
// Read status from systemctl status code-server@root
|
||||
browserDevStatus := utils.Exec(
|
||||
utils.GetPath(utils.WsPath),
|
||||
"sh",
|
||||
[]string{"-c", "systemctl --quiet is-active code-server@root && echo 'active' || echo 'inactive'"},
|
||||
)
|
||||
if browserDevStatus == "active" {
|
||||
fmt.Println("Browser Dev Environment is running")
|
||||
utils.WriteOption("BROWSERDEV_STATUS", "running")
|
||||
return "{\"status\": \"running\"}"
|
||||
} else {
|
||||
fmt.Println("Browser Dev Environment is not running")
|
||||
utils.WriteOption("BROWSERDEV_STATUS", "not_running")
|
||||
return "{\"status\": \"not_running\"}"
|
||||
}
|
||||
}
|
||||
|
||||
func taskActivateBrowserDev() string {
|
||||
fmt.Println("Executing taskActivateBrowserDev")
|
||||
wsPath := utils.GetPath(utils.WsPath)
|
||||
|
||||
Reference in New Issue
Block a user