mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-24 20:40:57 +03:00
Add multiple admins.
This commit is contained in:
parent
e23c8820ce
commit
0237b9ea53
12
cmd.go
12
cmd.go
@ -12,10 +12,10 @@ import (
|
||||
)
|
||||
|
||||
type Options struct {
|
||||
Verbose []bool `short:"v" long:"verbose" description:"Show verbose logging."`
|
||||
Identity string `short:"i" long:"identity" description:"Private key to identify server with." default:"~/.ssh/id_rsa"`
|
||||
Bind string `long:"bind" description:"Host and port to listen on." default:"0.0.0.0:22"`
|
||||
Admin string `long:"admin" description:"Fingerprint of pubkey to mark as admin."`
|
||||
Verbose []bool `short:"v" long:"verbose" description:"Show verbose logging."`
|
||||
Identity string `short:"i" long:"identity" description:"Private key to identify server with." default:"~/.ssh/id_rsa"`
|
||||
Bind string `long:"bind" description:"Host and port to listen on." default:"0.0.0.0:22"`
|
||||
Admin []string `long:"admin" description:"Fingerprint of pubkey to mark as admin."`
|
||||
}
|
||||
|
||||
var logLevels = []log.Level{
|
||||
@ -67,8 +67,8 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
if options.Admin != "" {
|
||||
server.Op(options.Admin)
|
||||
for _, fingerprint := range options.Admin {
|
||||
server.Op(fingerprint)
|
||||
}
|
||||
|
||||
<-sig // Wait for ^C signal
|
||||
|
Loading…
x
Reference in New Issue
Block a user