-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't ask user to reload systemd service when running in docker
- Loading branch information
Showing
14 changed files
with
44 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//go:build !windows && !freebsd && !linux | ||
|
||
package reload | ||
|
||
// generic message since we don't know the platform | ||
const message = "Please reload the crowdsec process for the new configuration to be effective." |
2 changes: 1 addition & 1 deletion
2
cmd/crowdsec-cli/reload/reload_freebsd.go → cmd/crowdsec-cli/reload/message_freebsd.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package reload | ||
|
||
// actually sudo is not that popular on freebsd, but this will do | ||
const Message = "Run 'sudo service crowdsec reload' for the new configuration to be effective." | ||
const message = "Run 'sudo service crowdsec reload' for the new configuration to be effective." |
2 changes: 1 addition & 1 deletion
2
cmd/crowdsec-cli/reload/reload_linux.go → cmd/crowdsec-cli/reload/message_linux.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package reload | ||
|
||
// assume systemd, although gentoo and others may differ | ||
const Message = "Run 'sudo systemctl reload crowdsec' for the new configuration to be effective." | ||
const message = "Run 'sudo systemctl reload crowdsec' for the new configuration to be effective." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package reload | ||
|
||
const message = "Please restart the crowdsec service for the new configuration to be effective." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
//go:build !windows && !freebsd && !linux | ||
|
||
package reload | ||
|
||
// generic message since we don't know the platform | ||
const Message = "Please reload the crowdsec process for the new configuration to be effective." | ||
import ( | ||
"github.com/crowdsecurity/go-cs-lib/version" | ||
) | ||
|
||
func UserMessage() string { | ||
if version.System == "docker" { | ||
return "" | ||
} | ||
|
||
return message | ||
} |
This file was deleted.
Oops, something went wrong.