summaryrefslogtreecommitdiffstats
path: root/clover/cloverctl/src/cloverctl/cmd/start_ids.go
diff options
context:
space:
mode:
Diffstat (limited to 'clover/cloverctl/src/cloverctl/cmd/start_ids.go')
-rw-r--r--clover/cloverctl/src/cloverctl/cmd/start_ids.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/clover/cloverctl/src/cloverctl/cmd/start_ids.go b/clover/cloverctl/src/cloverctl/cmd/start_ids.go
index 0f495a7..be039fa 100644
--- a/clover/cloverctl/src/cloverctl/cmd/start_ids.go
+++ b/clover/cloverctl/src/cloverctl/cmd/start_ids.go
@@ -9,6 +9,7 @@ package cmd
import (
"fmt"
+ "os"
"gopkg.in/resty.v1"
"github.com/spf13/cobra"
)
@@ -16,8 +17,8 @@ import (
var startidsCmd = &cobra.Command{
Use: "ids",
- Short: "Start IDS process",
- Long: `Restart IDS process when adding custom rules`,
+ Short: "Start snort IDS process",
+ Long: `Restart snort IDS process when adding custom rules`,
Run: func(cmd *cobra.Command, args []string) {
startIDS()
},
@@ -29,14 +30,14 @@ func init() {
func startIDS() {
+ checkControllerIP()
url := controllerIP + "/snort/start"
resp, err := resty.R().
Get(url)
if err != nil {
- panic(err.Error())
+ fmt.Printf("Cannot connect to controller: %v\n", err)
+ os.Exit(1)
}
fmt.Printf("\n%v\n", resp)
}
-
-