From ffc12f63ec57682e7c7f6653332856acbeef3183 Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Fri, 27 Oct 2017 14:36:49 +0300 Subject: cmd/puppeth: simplifications and pre-built docker images --- cmd/puppeth/wizard_nginx.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'cmd/puppeth/wizard_nginx.go') diff --git a/cmd/puppeth/wizard_nginx.go b/cmd/puppeth/wizard_nginx.go index 919ab270b..4eeae93a0 100644 --- a/cmd/puppeth/wizard_nginx.go +++ b/cmd/puppeth/wizard_nginx.go @@ -29,7 +29,8 @@ import ( // // If the user elects not to use a reverse proxy, an empty hostname is returned! func (w *wizard) ensureVirtualHost(client *sshClient, port int, def string) (string, error) { - if proxy, _ := checkNginx(client, w.network); proxy != nil { + proxy, _ := checkNginx(client, w.network) + if proxy != nil { // Reverse proxy is running, if ports match, we need a virtual host if proxy.port == port { fmt.Println() @@ -41,10 +42,12 @@ func (w *wizard) ensureVirtualHost(client *sshClient, port int, def string) (str fmt.Println() fmt.Println("Allow sharing the port with other services (y/n)? (default = yes)") if w.readDefaultString("y") == "y" { - fmt.Println() - fmt.Printf("Should the reverse-proxy be rebuilt from scratch (y/n)? (default = no)\n") - nocache := w.readDefaultString("n") != "n" - + nocache := false + if proxy != nil { + fmt.Println() + fmt.Printf("Should the reverse-proxy be rebuilt from scratch (y/n)? (default = no)\n") + nocache = w.readDefaultString("n") != "n" + } if out, err := deployNginx(client, w.network, port, nocache); err != nil { log.Error("Failed to deploy reverse-proxy", "err", err) if len(out) > 0 { -- cgit