aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-03-28 18:06:57 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-03-28 18:12:23 -0700
commit2d0f2abe62a5cc7272f7aeabc761bc7cf2147592 (patch)
tree169b3d5afd65550b60c054c9460d090f45d328c6 /cmd
parent291a5280359f199d14007730b34b30b29ce8d018 (diff)
Add cmdline flag to specify network interface
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mobius-hotline-server/main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/mobius-hotline-server/main.go b/cmd/mobius-hotline-server/main.go
index c5eea27..7d3bf27 100644
--- a/cmd/mobius-hotline-server/main.go
+++ b/cmd/mobius-hotline-server/main.go
@@ -43,7 +43,8 @@ func main() {
// }
// }()
- basePort := flag.Int("bind", defaultPort, "Bind address and port")
+ netInterface := flag.String("interface", "", "IP addr of interface to listen on. Defaults to all interfaces.")
+ basePort := flag.Int("bind", defaultPort, "Base Hotline server port. File transfer port is base port + 1.")
statsPort := flag.String("stats-port", "", "Enable stats HTTP endpoint on address and port")
configDir := flag.String("config", defaultConfigPath(), "Path to config root")
version := flag.Bool("version", false, "print version and exit")
@@ -96,7 +97,7 @@ func main() {
logger.Fatalw("Configuration directory not found. Correct the path or re-run with -init to generate initial config.", "path", configDir)
}
- srv, err := hotline.NewServer(*configDir, *basePort, logger, &hotline.OSFileStore{})
+ srv, err := hotline.NewServer(*configDir, *netInterface, *basePort, logger, &hotline.OSFileStore{})
if err != nil {
logger.Fatal(err)
}