20 lines
335 B
Go
20 lines
335 B
Go
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"os"
|
||
|
"upod/internal/container"
|
||
|
"upod/internal/log"
|
||
|
)
|
||
|
|
||
|
func Start(ctx context.Context) error {
|
||
|
|
||
|
if len(os.Args) >= 3 && os.Args[1] == "init" {
|
||
|
log.Debug("cmd.Start: init args=%v", os.Args)
|
||
|
|
||
|
container.RunContainerInitProcess(os.Args[2], os.Args[2:])
|
||
|
}
|
||
|
|
||
|
return rootCommand.ExecuteContext(ctx)
|
||
|
}
|