summaryrefslogtreecommitdiff
path: root/lib/chef/platform
diff options
context:
space:
mode:
authorGrant Ridder <shortdudey123@gmail.com>2017-05-15 14:06:03 -0700
committerGrant Ridder <shortdudey123@gmail.com>2017-05-15 14:06:03 -0700
commit1439b676b1221eb9db3ff395d2a8547b1a31e0da (patch)
treeb80396bd67dba0a3638eeba774ffefebb2dbcff3 /lib/chef/platform
parent013d559b186e760f1f478180a15a5289f49e4849 (diff)
downloadchef-1439b676b1221eb9db3ff395d2a8547b1a31e0da.tar.gz
Prefer Systemd with sysvinit script over Upstart for service provider
On newer Debian based systems that use systemd to have a package install a SysV init and Upstart script. Systemd can use systemd service files or SysV init scripts. However, on the Chef serivce provider side, this is not reflected. So in this case, Upstart will be prefered even if Upstart itself is not installed on the system. Signed-off-by: Grant Ridder <shortdudey123@gmail.com>
Diffstat (limited to 'lib/chef/platform')
-rw-r--r--lib/chef/platform/service_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/platform/service_helpers.rb b/lib/chef/platform/service_helpers.rb
index 87b87d4c72..02d293449c 100644
--- a/lib/chef/platform/service_helpers.rb
+++ b/lib/chef/platform/service_helpers.rb
@@ -69,7 +69,7 @@ class Chef
configs = []
if ::File.exist?(Chef.path_to("/etc/init.d/#{service_name}"))
- configs << :initd
+ configs += [ :initd, :systemd ]
end
if ::File.exist?(Chef.path_to("/etc/init/#{service_name}.conf"))