summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Williams <nathan@teamtreehouse.com>2015-09-01 09:24:31 -0700
committerNathan Williams <nathan@teamtreehouse.com>2015-09-01 09:24:31 -0700
commite6b2a07634f8eef374e1edb84387d69bca3044c1 (patch)
treef4db0b54fc2594db405f6701013ef5e0c09d6924
parent266873574dca9b6d9122b1f9647847bcd1c16d42 (diff)
downloadchef-e6b2a07634f8eef374e1edb84387d69bca3044c1.tar.gz
add support for non-service units
-rw-r--r--lib/chef/platform/service_helpers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/platform/service_helpers.rb b/lib/chef/platform/service_helpers.rb
index 1fcea44bcd..92efe24da2 100644
--- a/lib/chef/platform/service_helpers.rb
+++ b/lib/chef/platform/service_helpers.rb
@@ -102,7 +102,8 @@ class Chef
def has_systemd_service_unit?(svc_name)
%w( /etc /run /usr/lib ).any? do |cfg_base|
- ::File.exist?("#{cfg_base}/systemd/system/#{svc_name.gsub(/@.*$/, '@')}.service")
+ ::File.exist?("#{cfg_base}/systemd/system/#{svc_name.gsub(/@.*$/, '@')}.service") ||
+ ::File.exist?("#{cfg_base}/systemd/system/#{svc_name}") # TODO: Stop supporting non-service units
end
end
end