board

package
v0.0.0-...-e864152 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "board [device ID]",
	Short: "ssh into a pi",
	Long:  "open an ssh connection to a pi with the ability to enter commands",
	Args:  args.ValidDeviceID,
	Run: func(cmd *cobra.Command, args []string) {
		sshArgs := []string{"ssh", fmt.Sprintf("pi@%s.byu.edu", args[0])}
		sshPath, err := exec.LookPath("ssh")
		if err != nil {
			fmt.Printf("failure to find ssh executable: %v", err)
			os.Exit(1)
		}
		err = syscall.Exec(sshPath, sshArgs, os.Environ())
		if err != nil {
			fmt.Printf("board error: %v\n", err)
			os.Exit(1)
		}
	},
}

Cmd .

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL