parent
2763366309
commit
9a42190e13
|
@ -129,23 +129,22 @@ After running this command your will need to validate the enrollment in the weba
|
||||||
Long: `
|
Long: `
|
||||||
Enable given information push to the central API. Allows to empower the console`,
|
Enable given information push to the central API. Allows to empower the console`,
|
||||||
ValidArgs: csconfig.CONSOLE_CONFIGS,
|
ValidArgs: csconfig.CONSOLE_CONFIGS,
|
||||||
Args: cobra.MinimumNArgs(1),
|
|
||||||
DisableAutoGenTag: true,
|
DisableAutoGenTag: true,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
if enableAll {
|
if enableAll {
|
||||||
SetConsoleOpts(csconfig.CONSOLE_CONFIGS, true)
|
SetConsoleOpts(csconfig.CONSOLE_CONFIGS, true)
|
||||||
} else {
|
log.Infof("All features have been enabled successfully")
|
||||||
SetConsoleOpts(args, true)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if len(args) == 0 {
|
||||||
|
log.Fatalf("You must specify at least one feature to enable")
|
||||||
|
}
|
||||||
|
SetConsoleOpts(args, true)
|
||||||
|
log.Infof("%v have been enabled", args)
|
||||||
|
}
|
||||||
if err := csConfig.API.Server.DumpConsoleConfig(); err != nil {
|
if err := csConfig.API.Server.DumpConsoleConfig(); err != nil {
|
||||||
log.Fatalf("failed writing console config : %s", err)
|
log.Fatalf("failed writing console config : %s", err)
|
||||||
}
|
}
|
||||||
if enableAll {
|
|
||||||
log.Infof("All features have been enabled successfully")
|
|
||||||
} else {
|
|
||||||
log.Infof("%v have been enabled", args)
|
|
||||||
}
|
|
||||||
log.Infof(ReloadMessage())
|
log.Infof(ReloadMessage())
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue