Skip to content

Commit

Permalink
fix(cmd): make tunasynctl work with both HTTP and HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
bigeagle committed Dec 10, 2016
1 parent 7601e57 commit 97e9725
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/tunasynctl/tunasynctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ func initialize(c *cli.Context) error {
}

// parse base url of the manager server
baseURL = fmt.Sprintf("https://%s:%d",
cfg.ManagerAddr, cfg.ManagerPort)
if cfg.CACert != "" {
baseURL = fmt.Sprintf("https://%s:%d", cfg.ManagerAddr, cfg.ManagerPort)
} else {
baseURL = fmt.Sprintf("http://%s:%d", cfg.ManagerAddr, cfg.ManagerPort)
}

logger.Infof("Use manager address: %s", baseURL)

Expand Down

0 comments on commit 97e9725

Please sign in to comment.