Add gocage destroy command, v0.35

This commit is contained in:
yo 2023-07-09 13:42:24 +02:00
parent e11fc96e05
commit 925c3dd96b

View File

@ -15,7 +15,7 @@ import (
)
const (
gVersion = "0.34"
gVersion = "0.35"
// TODO : Get from $jail_zpool/defaults.json
MIN_DYN_DEVFS_RULESET = 1000
@ -99,8 +99,8 @@ ex: gocage list srv-db srv-web`,
ListJailsProps(args)
},
}
/* destroyCmd = &cobra.Command{
destroyCmd = &cobra.Command{
Use: "destroy",
Short: "destroy jails",
Long: `Destroy jail filesystem, snapshots and configuration file.`,
@ -109,7 +109,7 @@ ex: gocage list srv-db srv-web`,
DestroyJails(args)
},
}
*/
stopCmd = &cobra.Command{
Use: "stop",
Short: "stop jail",
@ -343,7 +343,7 @@ func init() {
listCmd.Flags().StringVarP(&gFilterJails, "filter", "f", "none", "Only display jails with these values. Ex: \"gocage list -f Config.Boot=1\" will only list started on boot jails")
listCmd.Flags().StringVarP(&gSortJailFields, "sort", "s", "none", "Display jails sorted by field values. Ex: \"gocage list -s +Name,-Config.Priority\" will sort jails by their decreasing name, then increasing start priority. 3 critera max supported.")
// destroyCmd.Flags().BoolVarP(&gForce, "force", "f", false, "Force stop jail if running")
destroyCmd.Flags().BoolVarP(&gForce, "force", "f", false, "Force stop jail if running")
snapshotListCmd.Flags().StringVarP(&gDisplaySColumns, "outcol", "o", "Jailname,Name,Creation,Referenced,Used", "Show these columns in output")
snapshotListCmd.Flags().BoolVarP(&gNoSnapLineSep, "nolinesep", "l", false, "Do not display line separator between snapshots")
@ -381,7 +381,7 @@ func init() {
rootCmd.AddCommand(stopCmd)
rootCmd.AddCommand(startCmd)
rootCmd.AddCommand(restartCmd)
// rootCmd.AddCommand(destroyCmd)
rootCmd.AddCommand(destroyCmd)
rootCmd.AddCommand(shellCmd)
rootCmd.AddCommand(getCmd)
rootCmd.AddCommand(setCmd)