Prefer `systemctl restart crowdsec` to `systemctl reload crowdsec`
authorCyril Brulebois <cyril@debamax.com>
Mon, 1 Mar 2021 20:40:04 +0000 (20:40 +0000)
committerCyril Brulebois <cyril@debamax.com>
Sat, 4 Dec 2021 04:03:33 +0000 (04:03 +0000)
As of version 1.0.8, reloading doesn't work due to failures to reopen
the database:
  https://github.com/crowdsecurity/crowdsec/issues/656

Until this is fixed, advertise `systemctl restart crowdsec` instead.

Signed-off-by: Cyril Brulebois <cyril@debamax.com>
Gbp-Pq: Name 0006-prefer-systemctl-restart.patch

cmd/crowdsec-cli/capi.go
cmd/crowdsec-cli/collections.go
cmd/crowdsec-cli/lapi.go
cmd/crowdsec-cli/parsers.go
cmd/crowdsec-cli/postoverflows.go
cmd/crowdsec-cli/scenarios.go
cmd/crowdsec-cli/simulation.go

index 05e95b6be6de4f297aaaf5f20ce53355d952c2ae..11ce9161ede05059d4c96cbfd2495bc74254bfb1 100644 (file)
@@ -96,7 +96,7 @@ func NewCapiCmd() *cobra.Command {
                                fmt.Printf("%s\n", string(apiConfigDump))
                        }
 
-                       log.Warningf("Run 'sudo systemctl reload crowdsec' for the new configuration to be effective")
+                       log.Warningf("Run 'sudo systemctl restart crowdsec' for the new configuration to be effective")
                },
        }
        cmdCapiRegister.Flags().StringVarP(&outputFile, "file", "f", "", "output file destination")
index 8151a465ac6e352b00c1b23ec990dfcf3b966130..5553390097c888ae6563fa1078c871a615816d39 100644 (file)
@@ -31,7 +31,7 @@ func NewCollectionsCmd() *cobra.Command {
                        if cmd.Name() == "inspect" || cmd.Name() == "list" {
                                return
                        }
-                       log.Infof("Run 'sudo systemctl reload crowdsec' for the new configuration to be effective.")
+                       log.Infof("Run 'sudo systemctl restart crowdsec' for the new configuration to be effective.")
                },
        }
 
index 04d6ff697b284de4405822b299b1c58e6ebfd913..f2b98d93d945d15b42560250d3d9199b8fa0b5be 100644 (file)
@@ -112,7 +112,7 @@ Keep in mind the machine needs to be validated by an administrator on LAPI side
                        } else {
                                fmt.Printf("%s\n", string(apiConfigDump))
                        }
-                       log.Warningf("Run 'sudo systemctl reload crowdsec' for the new configuration to be effective")
+                       log.Warningf("Run 'sudo systemctl restart crowdsec' for the new configuration to be effective")
                },
        }
        cmdLapiRegister.Flags().StringVarP(&apiURL, "url", "u", "", "URL of the API (ie. http://127.0.0.1)")
index a12c2f25a2aa21cfa7931615412b0e35dfe6203e..f4deae6514a9788d420386549420b03eca3835a5 100644 (file)
@@ -35,7 +35,7 @@ cscli parsers remove crowdsecurity/sshd-logs
                        if cmd.Name() == "inspect" || cmd.Name() == "list" {
                                return
                        }
-                       log.Infof("Run 'sudo systemctl reload crowdsec' for the new configuration to be effective.")
+                       log.Infof("Run 'sudo systemctl restart crowdsec' for the new configuration to be effective.")
                },
        }
 
index ae762380551ced052543177a4c937b4349543409..47ecf76b5418c650606e020bd137fc7f5ee640be 100644 (file)
@@ -34,7 +34,7 @@ func NewPostOverflowsCmd() *cobra.Command {
                        if cmd.Name() == "inspect" || cmd.Name() == "list" {
                                return
                        }
-                       log.Infof("Run 'sudo systemctl reload crowdsec' for the new configuration to be effective.")
+                       log.Infof("Run 'sudo systemctl restart crowdsec' for the new configuration to be effective.")
                },
        }
 
index e3f3d3920b8e926ce4e5f14592c8ec62cd4eed54..82738be53515af2bc2078a28087b9d1041554c6c 100644 (file)
@@ -35,7 +35,7 @@ cscli scenarios remove crowdsecurity/ssh-bf
                        if cmd.Name() == "inspect" || cmd.Name() == "list" {
                                return
                        }
-                       log.Infof("Run 'sudo systemctl reload crowdsec' for the new configuration to be effective.")
+                       log.Infof("Run 'sudo systemctl restart crowdsec' for the new configuration to be effective.")
                },
        }
 
index 87152e147b95bbec2fced57aa8468bda13aa5cf5..e6d2029d9fcb30d5910bea03408b9b6f14c6b0a2 100644 (file)
@@ -112,7 +112,7 @@ cscli simulation disable crowdsecurity/ssh-bf`,
                },
                PersistentPostRun: func(cmd *cobra.Command, args []string) {
                        if cmd.Name() != "status" {
-                               log.Infof("Run 'sudo systemctl reload crowdsec' for the new configuration to be effective.")
+                               log.Infof("Run 'sudo systemctl restart crowdsec' for the new configuration to be effective.")
                        }
                },
        }