Shebang should be on the first line of script (#5747)

* Shebang should be on the first line of script

* Set 644 file mode for SystemD unit file
This commit is contained in:
Michael Nunes 2022-05-23 19:18:19 -03:00 committed by GitHub
parent 78b1a60a0d
commit bc9f2b1b16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,8 @@ const (
DefaultDirMode = 0o755
// DefaultFileMode is the default file mode to apply to created files.
DefaultFileMode = 0o600
// DefaultSystemdUnitMode is the required file mode to systemd unit files.
DefaultSystemdUnitMode = 0o644
// DesktopAppExecName is the name of Fleet's Desktop executable.
//
// We use fleet-desktop as name to properly identify the process when listing

View File

@ -228,7 +228,7 @@ CPUQuota=20%
[Install]
WantedBy=multi-user.target
`),
constant.DefaultFileMode,
constant.DefaultSystemdUnitMode,
); err != nil {
return fmt.Errorf("write file: %w", err)
}
@ -275,8 +275,7 @@ func writeEnvFile(opt Options, rootPath string) error {
return nil
}
var postInstallTemplate = template.Must(template.New("postinstall").Parse(`
#!/bin/sh
var postInstallTemplate = template.Must(template.New("postinstall").Parse(`#!/bin/sh
# Exit on error
set -e