From 9d23b391fe627c5921ab53e07a9a325cd04aa4c9 Mon Sep 17 00:00:00 2001 From: jabuxas Date: Wed, 18 Sep 2024 10:16:03 -0300 Subject: [PATCH] fix: more intuitive port handling --- abyss.go | 3 ++- generate_config.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/abyss.go b/abyss.go index 3abbf0a..fcbcd05 100644 --- a/abyss.go +++ b/abyss.go @@ -43,11 +43,12 @@ func main() { app.filesDir = "./files" } - if app.port == ":" { + if app.port == "" { slog.Info("running on default port") app.port = ":3235" } else { slog.Info("running on modified port") + app.port = ":" + app.port } mux := http.NewServeMux() diff --git a/generate_config.sh b/generate_config.sh index ea6e959..a836a89 100755 --- a/generate_config.sh +++ b/generate_config.sh @@ -30,7 +30,7 @@ ABYSS_URL=$ABYSS_URL ABYSS_FILEDIR=$ABYSS_FILEDIR # The port the server will run on, it's fine to leave it empty. Defaults to :3235 -ABYSS_PORT=:$ABYSS_PORT +ABYSS_PORT=$ABYSS_PORT # This is the username of the user for accessing /tree AUTH_USERNAME=$AUTH_USERNAME