From a201b04b269cf48965fee7a91f450aa57c8e6160 Mon Sep 17 00:00:00 2001 From: Marko Springfeldt Date: Mon, 29 Jan 2018 16:27:10 +0100 Subject: [PATCH] `enable` habitat supervisor service before `start` Signed-off-by: Arash Zandi --- builtin/provisioners/habitat/resource_provisioner.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/provisioners/habitat/resource_provisioner.go b/builtin/provisioners/habitat/resource_provisioner.go index 6c41fe8ef5..f3e3361c86 100644 --- a/builtin/provisioners/habitat/resource_provisioner.go +++ b/builtin/provisioners/habitat/resource_provisioner.go @@ -587,9 +587,9 @@ func (p *provisioner) startHabSystemd(o terraform.UIOutput, comm communicator.Co } if p.UseSudo { - command = fmt.Sprintf("sudo systemctl start %s", p.ServiceName) + command = fmt.Sprintf("sudo systemctl enable hab-supervisor && sudo systemctl start hab-supervisor") } else { - command = fmt.Sprintf("systemctl start %s", p.ServiceName) + command = fmt.Sprintf("systemctl enable hab-supervisor && systemctl start hab-supervisor") } return p.runCommand(o, comm, command) }