github.com/crowdsecurity/crowdsec@v1.6.1/cmd/crowdsec-cli/messages.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "runtime" 6 ) 7 8 // ReloadMessage returns a description of the task required to reload 9 // the crowdsec configuration, according to the operating system. 10 func ReloadMessage() string { 11 var msg string 12 13 switch runtime.GOOS { 14 case "windows": 15 msg = "Please restart the crowdsec service" 16 case "freebsd": 17 msg = `Run 'sudo service crowdsec reload'` 18 default: 19 msg = `Run 'sudo systemctl reload crowdsec'` 20 } 21 22 return fmt.Sprintf("%s for the new configuration to be effective.", msg) 23 }