From: Cyril Brulebois Date: Mon, 1 Mar 2021 20:40:04 +0000 (+0000) Subject: Prefer `systemctl restart crowdsec` to `systemctl reload crowdsec` X-Git-Tag: archive/raspbian/1.0.9-3+rpi1^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cc2b2d8b6103e1e7d739e30a457629be3e261e25;p=crowdsec.git Prefer `systemctl restart crowdsec` to `systemctl reload crowdsec` 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 Gbp-Pq: Name 0006-prefer-systemctl-restart.patch --- diff --git a/cmd/crowdsec-cli/capi.go b/cmd/crowdsec-cli/capi.go index 05e95b6..11ce916 100644 --- a/cmd/crowdsec-cli/capi.go +++ b/cmd/crowdsec-cli/capi.go @@ -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") diff --git a/cmd/crowdsec-cli/collections.go b/cmd/crowdsec-cli/collections.go index 8151a46..5553390 100644 --- a/cmd/crowdsec-cli/collections.go +++ b/cmd/crowdsec-cli/collections.go @@ -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.") }, } diff --git a/cmd/crowdsec-cli/lapi.go b/cmd/crowdsec-cli/lapi.go index 04d6ff6..f2b98d9 100644 --- a/cmd/crowdsec-cli/lapi.go +++ b/cmd/crowdsec-cli/lapi.go @@ -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)") diff --git a/cmd/crowdsec-cli/parsers.go b/cmd/crowdsec-cli/parsers.go index a12c2f2..f4deae6 100644 --- a/cmd/crowdsec-cli/parsers.go +++ b/cmd/crowdsec-cli/parsers.go @@ -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.") }, } diff --git a/cmd/crowdsec-cli/postoverflows.go b/cmd/crowdsec-cli/postoverflows.go index ae76238..47ecf76 100644 --- a/cmd/crowdsec-cli/postoverflows.go +++ b/cmd/crowdsec-cli/postoverflows.go @@ -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.") }, } diff --git a/cmd/crowdsec-cli/scenarios.go b/cmd/crowdsec-cli/scenarios.go index e3f3d39..82738be 100644 --- a/cmd/crowdsec-cli/scenarios.go +++ b/cmd/crowdsec-cli/scenarios.go @@ -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.") }, } diff --git a/cmd/crowdsec-cli/simulation.go b/cmd/crowdsec-cli/simulation.go index 87152e1..e6d2029 100644 --- a/cmd/crowdsec-cli/simulation.go +++ b/cmd/crowdsec-cli/simulation.go @@ -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.") } }, }