mirror of
https://github.com/edgebox-iot/edgeboxctl.git
synced 2026-09-24 05:41:43 +02:00
Added RunEdgeApp and StopEdgeApp funcs
This commit is contained in:
@@ -120,3 +120,23 @@ func GetEdgeAppServices(ID string) []EdgeAppService {
|
||||
return edgeAppServices
|
||||
|
||||
}
|
||||
|
||||
// RunEdgeApp : Run an EdgeApp and return its most current status
|
||||
func RunEdgeApp(ID string) EdgeAppStatus {
|
||||
|
||||
cmdArgs := []string{"-f", wsPath + "/docker-compose.yml", "up", ID}
|
||||
utils.Exec("docker-compose", cmdArgs)
|
||||
|
||||
return GetEdgeAppStatus(ID)
|
||||
|
||||
}
|
||||
|
||||
// StopEdgeApp : Stops an EdgeApp and return its most current status
|
||||
func StopEdgeApp(ID string) EdgeAppStatus {
|
||||
|
||||
cmdArgs := []string{"-f", wsPath + "/docker-compose.yml", "down", ID}
|
||||
utils.Exec("docker-compose", cmdArgs)
|
||||
|
||||
return GetEdgeAppStatus(ID)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user