From 7cb87c2cf749e68050c9c95e0c147864140a864c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org>
Date: Tue, 31 Aug 2021 09:27:59 +0200
Subject: [PATCH] :ambulance: fix(services) Fix service state when applying a
 template to a system

Because they do not show the activation header, services where marked as
 always active and this messed up template application on systems.

issue #6189
---
 include/simpleplugin/class_simpleService.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/simpleplugin/class_simpleService.inc b/include/simpleplugin/class_simpleService.inc
index 47fc2ff3d..889ea71a8 100644
--- a/include/simpleplugin/class_simpleService.inc
+++ b/include/simpleplugin/class_simpleService.inc
@@ -42,6 +42,10 @@ class simpleService extends simplePlugin
   {
     /* $parent is the instance of servicesManagement in this case, we set it as parent */
     parent::__construct($dn, $parent, $parent, FALSE, $attributesInfo);
+
+    /* Services do not have the activation header, but can still be disabled */
+    $this->ignore_account = FALSE;
+
     $plInfos = pluglist::pluginInfos(get_class($this));
     $this->DisplayName  = $plInfos['plShortName'];
   }
-- 
GitLab