File: messages.go

package info (click to toggle)
crowdsec 1.4.6-10.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,500 kB
  • sloc: sh: 2,870; makefile: 386; python: 74
file content (23 lines) | stat: -rw-r--r-- 512 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package main

import (
	"fmt"
	"runtime"
)

// ReloadMessage returns a description of the task required to reload
// the crowdsec configuration, according to the operating system.
func ReloadMessage() string {
	var msg string

	switch runtime.GOOS {
	case "windows":
		msg = "Please restart the crowdsec service"
	case "freebsd":
		msg = `Run 'sudo service crowdsec reload'`
	default:
		msg = `Run 'sudo systemctl reload crowdsec'`
	}

	return fmt.Sprintf("%s for the new configuration to be effective.", msg)
}