EEBus: enable SHIP Pairing Service (#30842)
This commit is contained in:
parent
f01ecb6909
commit
3a560d1254
13 changed files with 663 additions and 39 deletions
12
cmd/setup.go
12
cmd/setup.go
|
|
@ -937,6 +937,18 @@ func configureEEBus(conf *eebus.Config) error {
|
|||
}
|
||||
}
|
||||
|
||||
// generate a SHIP pairing secret for configs that predate SHIP pairing
|
||||
if conf.Secret == "" {
|
||||
secret, err := eebus.CreatePairingSecret()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
conf.Secret = secret
|
||||
if err := settings.SetJson(keys.EEBus, conf); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
srv, err := eebus.NewServer(*conf)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed configuring eebus: %w", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue