diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-11-24 16:56:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-24 16:56:33 +0800 |
commit | f9569f3cd8a05dff5be5da83a5d8c70c1b23dd3e (patch) | |
tree | fa8b344aedb3d56c2cd904173053a5273ec87a67 /cmd/puppeth/wizard_nginx.go | |
parent | 35801f938e21430f8fb0f2e1c3de5db7dbd21666 (diff) | |
parent | a3a2c6b0d9f963c9377612cae1ed6ded6f216c2d (diff) | |
download | go-tangerine-f9569f3cd8a05dff5be5da83a5d8c70c1b23dd3e.tar go-tangerine-f9569f3cd8a05dff5be5da83a5d8c70c1b23dd3e.tar.gz go-tangerine-f9569f3cd8a05dff5be5da83a5d8c70c1b23dd3e.tar.bz2 go-tangerine-f9569f3cd8a05dff5be5da83a5d8c70c1b23dd3e.tar.lz go-tangerine-f9569f3cd8a05dff5be5da83a5d8c70c1b23dd3e.tar.xz go-tangerine-f9569f3cd8a05dff5be5da83a5d8c70c1b23dd3e.tar.zst go-tangerine-f9569f3cd8a05dff5be5da83a5d8c70c1b23dd3e.zip |
Merge pull request #15390 from karalabe/puppeth-devcon3
cmd/puppeth: new version as presented at devcon3
Diffstat (limited to 'cmd/puppeth/wizard_nginx.go')
-rw-r--r-- | cmd/puppeth/wizard_nginx.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cmd/puppeth/wizard_nginx.go b/cmd/puppeth/wizard_nginx.go index 86fba29f5..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,7 +42,13 @@ 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" { - if out, err := deployNginx(client, w.network, port); err != nil { + 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 { fmt.Printf("%s\n", out) |