mirror of
https://github.com/yudai/gotty.git
synced 2025-12-26 20:28:49 +01:00
Add --once option that accepts only one client and exit
This commit is contained in:
parent
e613b29cc3
commit
470621f39e
2 changed files with 20 additions and 0 deletions
6
main.go
6
main.go
|
|
@ -80,6 +80,11 @@ func main() {
|
|||
Usage: "Seconds to automatically reconnect to the server when the connection is closed (default: disabled)",
|
||||
EnvVar: "GOTTY_AUTO_RECONNECT",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "once",
|
||||
Usage: "Accept only one client and exits on disconnection",
|
||||
EnvVar: "GOTTY_ONCE",
|
||||
},
|
||||
}
|
||||
cmd.Action = func(c *cli.Context) {
|
||||
if len(c.Args()) == 0 {
|
||||
|
|
@ -101,6 +106,7 @@ func main() {
|
|||
c.String("tls-key"),
|
||||
c.String("title-format"),
|
||||
c.Int("auto-reconnect"),
|
||||
c.Bool("once"),
|
||||
c.Args(),
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue