Added .service to hooks unit files

Recent versions of systemd (version 229 at least) included in Ubuntu
16.04 and Debian 9 require the systemd unit files to have a .service
extension.

Signed-off-by: Ali Rizwan <ari@hellofresh.com>
This commit is contained in:
Ali Rizwan 2017-11-24 17:07:58 +01:00
parent e5194cf08b
commit c324b01b7a
1 changed files with 3 additions and 3 deletions

View File

@ -53,12 +53,12 @@ func (h *HookBuilder) Build(c *fi.ModelBuilderContext) error {
var name string
switch hook.Name {
case "":
name = fmt.Sprintf("kops-hook-%d", j)
name = fmt.Sprintf("kops-hook-%d.service", j)
if isInstanceGroup {
name = fmt.Sprintf("%s-ig", name)
name = fmt.Sprintf("%s-ig.service", name)
}
default:
name = hook.Name
name = fmt.Sprintf("%s.service", hook.Name)
}
if _, found := hookNames[name]; found {