From 1d1ac3cb1d12ba505b795f0137e592048fc9b644 Mon Sep 17 00:00:00 2001 From: requilence Date: Mon, 1 Oct 2018 18:54:20 +0300 Subject: [PATCH] fix how to start the service console msg: add sudo --- cmd/cagent/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/cagent/main.go b/cmd/cagent/main.go index c85ef20..b8128e8 100644 --- a/cmd/cagent/main.go +++ b/cmd/cagent/main.go @@ -268,13 +268,13 @@ func main() { switch systemManager.String() { case "unix-systemv": - fmt.Printf("Run this command to stop/start it:\nservice %s stop\nservice %s start\n\n", svcConfig.Name, svcConfig.Name) + fmt.Printf("Run this command to stop/start it:\nsudo service %s stop\nsudo service %s start\n\n", svcConfig.Name, svcConfig.Name) case "linux-upstart": - fmt.Printf("Run this command to stop/start it:\ninitctl stop %s\ninitctl start %s\n\n", svcConfig.Name, svcConfig.Name) + fmt.Printf("Run this command to stop/start it:\nsudo initctl stop %s\nsudo initctl start %s\n\n", svcConfig.Name, svcConfig.Name) case "linux-systemd": - fmt.Printf("Run this command to stop/start it:\nsystemctl stop %s\nsystemctl start %s.service\n\n", svcConfig.Name, svcConfig.Name) + fmt.Printf("Run this command to stop/start it:\nsudo systemctl stop %s.service\nsudo systemctl start %s.service\n\n", svcConfig.Name, svcConfig.Name) case "darwin-launchd": - fmt.Printf("Run this command to stop/start it:\nlaunchctl unload %s\nlaunchctl load /Library/LaunchDaemons/%s.plist\n\n", svcConfig.Name, svcConfig.Name) + fmt.Printf("Run this command to stop/start it:\nsudo launchctl unload %s\nsudo launchctl load /Library/LaunchDaemons/%s.plist\n\n", svcConfig.Name, svcConfig.Name) case "windows-service": fmt.Printf("Use the Windows Service Manager to stop/start it\n\n") }