From 36c23c1e4f8fdae4963734b8146254b93291e8ca Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Wed, 21 Jul 2021 17:17:59 +0100 Subject: [PATCH] setup: respect -p/-port fixes #128. --- main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 2c47deb..21a4d96 100644 --- a/main.go +++ b/main.go @@ -519,7 +519,12 @@ func start(asDaemon, firstCall bool) { } } else { debugMode = false - address = "0.0.0.0:8056" + if *PORT != app.port && *PORT > 0 { + app.port = *PORT + } else { + app.port = 8056 + } + address = fmt.Sprintf("0.0.0.0:%d", app.port) app.storage.lang.SetupPath = "setup" err := app.storage.loadLangSetup(langFS) if err != nil {