From 30209d2890f6bc70b5f5c4e50d6c3f6d61a440d1 Mon Sep 17 00:00:00 2001 From: yo Date: Tue, 21 Dec 2021 20:48:15 +0100 Subject: [PATCH] Start implementing gocage start --- cmd/root.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index 425e531..5b4dc5b 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -66,6 +66,16 @@ ex: gocage list srv-db srv-web`, StopJail(args) }, } + + startCmd = &cobra.Command{ + Use: "start", + Short: "start jail", + Run: func(cmd *cobra.Command, args []string) { + // Get the inventory + ListJails(args, false) + StartJail(args) + }, + } ) @@ -87,6 +97,7 @@ func init() { rootCmd.AddCommand(versionCmd) rootCmd.AddCommand(listCmd) rootCmd.AddCommand(stopCmd) + rootCmd.AddCommand(startCmd) } func initConfig() {