Discovery server should print device ID of certificate at startup

This commit is contained in:
Jakob Borg 2015-11-04 16:55:21 +00:00
parent 602b12dcf5
commit 0d1df6bec3
1 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import (
"os"
"time"
"github.com/syncthing/syncthing/lib/protocol"
"github.com/thejerf/suture"
)
@ -54,6 +55,9 @@ func main() {
log.Fatalln("Failed to load X509 key pair:", err)
}
devID := protocol.NewDeviceID(cert.Certificate[0])
log.Println("Server device ID is", devID)
db, err := sql.Open(backend, dsn)
if err != nil {
log.Fatalln("sql.Open:", err)