Skip to content

Commit

Permalink
fix how to start the service console msg: add sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
requilence committed Oct 1, 2018
1 parent 11711b6 commit 1d1ac3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/cagent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 1d1ac3c

Please sign in to comment.