mirror of
https://github.com/fleetdm/fleet
synced 2026-05-06 06:48:54 +00:00
Add functionality to provide cert for windows agent (#1818)
* Adding certificate functionality to windows agent * Update windows template To allow for --fleet-certificate parameter when building windows agent * Gofmt -ed Windows.go * Gofmted windows.go again Replace space indentation with tab
This commit is contained in:
parent
79b5330a43
commit
87fa0301b3
2 changed files with 7 additions and 1 deletions
|
|
@ -56,6 +56,12 @@ func BuildMSI(opt Options) error {
|
|||
return errors.Wrap(err, "write enroll secret")
|
||||
}
|
||||
|
||||
if opt.FleetCertificate != "" {
|
||||
if err := writeCertificate(opt, orbitRoot); err != nil {
|
||||
return errors.Wrap(err, "write fleet certificate")
|
||||
}
|
||||
}
|
||||
|
||||
if err := writeWixFile(opt, tmpDir); err != nil {
|
||||
return errors.Wrap(err, "write wix file")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ var windowsWixTemplate = template.Must(template.New("").Option("missingkey=error
|
|||
ErrorControl="ignore"
|
||||
Start="auto"
|
||||
Type="ownProcess"
|
||||
Arguments='--root-dir "[ORBITROOT]." --log-file "[ORBITROOT]orbit-log.txt" {{ if .FleetURL }}--fleet-url "{{ .FleetURL }}"{{ end }} {{ if .EnrollSecret }}--enroll-secret-path "[ORBITROOT]secret.txt"{{ end }} {{if .Insecure }}--insecure{{ end }} {{ if .UpdateURL }}--update-url "{{ .UpdateURL }}" {{ end }} --orbit-channel "{{ .OrbitChannel }}" --osqueryd-channel "{{ .OsquerydChannel }}"'
|
||||
Arguments='--root-dir "[ORBITROOT]." --log-file "[ORBITROOT]orbit-log.txt" {{ if .FleetURL }}--fleet-url "{{ .FleetURL }}"{{ end }} {{ if .FleetCertificate }}--fleet-certificate "[ORBITROOT]fleet.pem"{{ end }} {{ if .EnrollSecret }}--enroll-secret-path "[ORBITROOT]secret.txt"{{ end }} {{if .Insecure }}--insecure{{ end }} {{ if .UpdateURL }}--update-url "{{ .UpdateURL }}" {{ end }} --orbit-channel "{{ .OrbitChannel }}" --osqueryd-channel "{{ .OsquerydChannel }}"'
|
||||
>
|
||||
<util:ServiceConfig
|
||||
FirstFailureActionType="restart"
|
||||
|
|
|
|||
Loading…
Reference in a new issue