Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
cli: handle Software option
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Aug 20, 2018
1 parent 2e3218d commit 53833d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ var rootCmd = &cobra.Command{
Workers: viper.GetInt("server.workers"),
Registry: reg,
AuthForSTUN: viper.GetBool("auth.stun"),
Software: viper.GetString("server.software"),
}
if o.Software != "" {
l.Info("will be sending SOFTWARE attribute", zap.String("software", o.Software))
}
if viper.GetBool("auth.public") {
l.Warn("auth is public")
Expand Down Expand Up @@ -301,6 +305,7 @@ func init() {
mustBind(viper.BindPFlag("server.listen", rootCmd.Flags().Lookup("listen")))
mustBind(viper.BindPFlag("server.pprof", rootCmd.Flags().Lookup("pprof")))
viper.SetDefault("server.workers", runtime.GOMAXPROCS(0))
viper.SetDefault("server.software", "gortc/gortcd")
viper.SetDefault("auth.stun", false)
viper.SetDefault("version", "1")
}
Expand Down

0 comments on commit 53833d7

Please sign in to comment.