Multi-client servers + bring back stdinserver support

This commit is contained in:
Christian Schwarz
2018-09-04 16:41:54 -07:00
parent e161347e47
commit 308e5e35fb
12 changed files with 356 additions and 71 deletions

13
main.go
View File

@ -57,6 +57,18 @@ var statusCmd = &cobra.Command{
},
}
var stdinserverCmd = &cobra.Command{
Use: "stdinserver CLIENT_IDENTITY",
Short: "start in stdinserver mode (from authorized_keys file)",
RunE: func(cmd *cobra.Command, args []string) error {
conf, err := config.ParseConfig(rootArgs.configFile)
if err != nil {
return err
}
return client.RunStdinserver(conf, args)
},
}
var rootArgs struct {
configFile string
}
@ -67,6 +79,7 @@ func init() {
rootCmd.AddCommand(daemonCmd)
rootCmd.AddCommand(wakeupCmd)
rootCmd.AddCommand(statusCmd)
rootCmd.AddCommand(stdinserverCmd)
}
func main() {