diff --git a/pkg/host/internal/service/service.go b/pkg/host/internal/service/service.go index f1574526f..c8705068a 100644 --- a/pkg/host/internal/service/service.go +++ b/pkg/host/internal/service/service.go @@ -97,8 +97,11 @@ func (s *service) EnableService(service *types.Service) error { } defer exit() - // Enable service - _, _, err = s.utilsHelper.RunCommand("systemctl", "enable", service.Name) + // Enable the service + // we use reenable command (the command is a combination of disable+enable) to reset + // symlinks for the unit and make sure that only symlinks that are currently + // configured in the [Install] section exist for the service. + _, _, err = s.utilsHelper.RunCommand("systemctl", "reenable", service.Name) return err }