Skip to content

Commit

Permalink
Add instructions for command line installation on pkg gen
Browse files Browse the repository at this point in the history
  • Loading branch information
dantecatalfamo committed Jan 6, 2025
1 parent efe3315 commit 0a8dd22
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions cmd/fleetctl/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,25 @@ func packageCommand() *cli.Command {
}

path, _ = filepath.Abs(path)
var installInstructions = "double-click the installer"
switch c.String("type") {
case "pkg":
installInstructions += fmt.Sprintf(" or run the command `installer -pkg \"%s\" -target /`", path)
case "deb":
installInstructions += fmt.Sprintf(" or run the command `sudo apt install \"%s\"`", path)
case "rpm":
installInstructions += fmt.Sprintf(" or run the command `sudo dnf install \"%s\"`", path)
case "msi":
installInstructions += fmt.Sprintf(" or run the command `msiexec /i \"%s\"` as administrator", path)
}

fmt.Printf(`
Success! You generated fleetd at %s
To add this device to Fleet, double-click to install fleetd.
To add this device to Fleet, %s.
To add other devices to Fleet, distribute fleetd using Chef, Ansible, Jamf, or Puppet. Learn how: https://fleetdm.com/learn-more-about/enrolling-hosts
`, path)
`, path, installInstructions)
if !disableOpenFolder {
open.Start(filepath.Dir(path)) //nolint:errcheck
}
Expand Down

0 comments on commit 0a8dd22

Please sign in to comment.