|
@@ -95,7 +95,7 @@ func simulationStatus() error {
|
|
|
|
|
|
func NewSimulationCmds() *cobra.Command {
|
|
|
var cmdSimulation = &cobra.Command{
|
|
|
- Use: "simulation enable|disable [scenario_name]",
|
|
|
+ Use: "simulation enable|disable [scenario_name]",
|
|
|
Short: "",
|
|
|
Long: ``,
|
|
|
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
|
@@ -104,6 +104,9 @@ func NewSimulationCmds() *cobra.Command {
|
|
|
}
|
|
|
return nil
|
|
|
},
|
|
|
+ PersistentPostRun: func(cmd *cobra.Command, args []string) {
|
|
|
+ log.Infof("Run 'systemctl reload crowdsec' for the new configuration to be effective.")
|
|
|
+ },
|
|
|
}
|
|
|
cmdSimulation.Flags().SortFlags = false
|
|
|
cmdSimulation.PersistentFlags().SortFlags = false
|
|
@@ -215,6 +218,8 @@ func NewSimulationCmds() *cobra.Command {
|
|
|
log.Fatalf(err.Error())
|
|
|
}
|
|
|
},
|
|
|
+ PersistentPostRun: func(cmd *cobra.Command, args []string) {
|
|
|
+ },
|
|
|
}
|
|
|
cmdSimulation.AddCommand(cmdSimulationStatus)
|
|
|
|