diff options
Diffstat (limited to 'pkg/systemdgen/systemdgen.go')
-rw-r--r-- | pkg/systemdgen/systemdgen.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/systemdgen/systemdgen.go b/pkg/systemdgen/systemdgen.go index 3d1c31b5d..fb91b3e82 100644 --- a/pkg/systemdgen/systemdgen.go +++ b/pkg/systemdgen/systemdgen.go @@ -2,7 +2,6 @@ package systemdgen import ( "fmt" - "path/filepath" "github.com/pkg/errors" ) @@ -33,11 +32,11 @@ func ValidateRestartPolicy(restart string) error { // CreateSystemdUnitAsString takes variables to create a systemd unit file used to control // a libpod container -func CreateSystemdUnitAsString(name, cid, restart, pidPath string, stopTimeout int) (string, error) { +func CreateSystemdUnitAsString(name, cid, restart, pidFile string, stopTimeout int) (string, error) { if err := ValidateRestartPolicy(restart); err != nil { return "", err } - pidFile := filepath.Join(pidPath, fmt.Sprintf("%s.pid", cid)) + unit := fmt.Sprintf(template, name, restart, name, stopTimeout, name, pidFile) return unit, nil } |