diff options
author | Nathan Williams <nath.e.will@gmail.com> | 2015-08-29 07:46:41 -0700 |
---|---|---|
committer | Nathan Williams <nath.e.will@gmail.com> | 2015-08-29 07:46:41 -0700 |
commit | 266873574dca9b6d9122b1f9647847bcd1c16d42 (patch) | |
tree | 14e3e8b103b3dfa92ae098234248735118c3f137 /lib/chef/platform | |
parent | 9eecb12994f13f45a8cdcc35e649574c071d9b66 (diff) | |
download | chef-266873574dca9b6d9122b1f9647847bcd1c16d42.tar.gz |
support service names like redis@6380 derived from units like redis@.service
Diffstat (limited to 'lib/chef/platform')
-rw-r--r-- | lib/chef/platform/service_helpers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/platform/service_helpers.rb b/lib/chef/platform/service_helpers.rb index ca0ed063da..1fcea44bcd 100644 --- a/lib/chef/platform/service_helpers.rb +++ b/lib/chef/platform/service_helpers.rb @@ -102,7 +102,7 @@ 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}.service") + ::File.exist?("#{cfg_base}/systemd/system/#{svc_name.gsub(/@.*$/, '@')}.service") end end end |