Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #66 from nyodas/systemd229
Browse files Browse the repository at this point in the history
Fix issue with double \ on old systemd. - use base64 for >229
  • Loading branch information
n0rad authored Oct 27, 2016
2 parents 5eba83e + 4e80037 commit 8e44556
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions work/unit-generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ func (u *Unit) Generate(tmpl *template.Templating) error {
if err != nil {
logs.WithEF(err, u.Fields).Panic("Cannot marshall attributes")
}
res := strings.Replace(string(out), "\\\"", `\x5c\x22`, -1)
res = strings.Replace(res, "'", `\\'`, -1)
res := strings.Replace(string(out), "\\\"", "\\\\\\\"", -1)
res = strings.Replace(res, "'", `\'`, -1)
data["attributes"] = res
data["attributesBase64"] = "base64," + base64.StdEncoding.EncodeToString([]byte(out))

Expand Down

0 comments on commit 8e44556

Please sign in to comment.