change startup public ip params

This commit is contained in:
nikk gitanes
2022-05-25 07:47:50 +03:00
parent 2df81cac78
commit 3af0566731

View File

@@ -32,8 +32,8 @@ type args struct {
DontKill bool `arg:"-k" help:"don't kill server on signal"` DontKill bool `arg:"-k" help:"don't kill server on signal"`
UI bool `arg:"-u" help:"open torrserver page in browser"` UI bool `arg:"-u" help:"open torrserver page in browser"`
TorrentsDir string `arg:"-t" help:"autoload torrents from dir"` TorrentsDir string `arg:"-t" help:"autoload torrents from dir"`
IPv4 string `arg:"-4" help:"set public IPv4 addr"` PubIPv4 string `arg:"-4" help:"set public IPv4 addr"`
IPv6 string `arg:"-6" help:"set public IPv6 addr"` PubIPv6 string `arg:"-6" help:"set public IPv6 addr"`
} }
func (args) Version() string { func (args) Version() string {
@@ -74,12 +74,12 @@ func main() {
}() }()
} }
if params.IPv4 != "" { if params.PubIPv4 != "" {
settings.PubIPv4 = params.IPv4 settings.PubIPv4 = params.PubIPv4
} }
if params.IPv6 != "" { if params.PubIPv6 != "" {
settings.PubIPv6 = params.IPv6 settings.PubIPv6 = params.PubIPv6
} }
if params.TorrentsDir != "" { if params.TorrentsDir != "" {