mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Add instructions for command line installation on pkg gen (#25166)
#25004
This commit is contained in:
parent
d46c427f5b
commit
d48c9baafa
2 changed files with 21 additions and 2 deletions
1
changes/25004-fleetctl-packge-cli-instructions
Normal file
1
changes/25004-fleetctl-packge-cli-instructions
Normal file
|
|
@ -0,0 +1 @@
|
|||
- Display command line installation instructions when a package is generated
|
||||
|
|
@ -377,13 +377,31 @@ func packageCommand() *cli.Command {
|
|||
}
|
||||
|
||||
path, _ = filepath.Abs(path)
|
||||
pathBase := filepath.Base(path)
|
||||
var installInstructions = "double-click the installer"
|
||||
var deviceType string
|
||||
switch c.String("type") {
|
||||
case "pkg":
|
||||
installInstructions += fmt.Sprintf(" or run the command `sudo installer -pkg \"%s\" -target /`", pathBase)
|
||||
deviceType = "macOS"
|
||||
case "deb":
|
||||
installInstructions += fmt.Sprintf(" or run the command `sudo apt install \"%s\"`", pathBase)
|
||||
deviceType = "Debian-based Linux"
|
||||
case "rpm":
|
||||
installInstructions += fmt.Sprintf(" or run the command `sudo dnf install \"%s\"`", pathBase)
|
||||
deviceType = "RPM-based Linux"
|
||||
case "msi":
|
||||
installInstructions += fmt.Sprintf(" or run the command `msiexec /i \"%s\"` as administrator", pathBase)
|
||||
deviceType = "Windows"
|
||||
}
|
||||
|
||||
fmt.Printf(`
|
||||
Success! You generated fleetd at %s
|
||||
|
||||
To add this device to Fleet, double-click to install fleetd.
|
||||
To add a new %s 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, deviceType, installInstructions)
|
||||
if !disableOpenFolder {
|
||||
open.Start(filepath.Dir(path)) //nolint:errcheck
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue