From 266873574dca9b6d9122b1f9647847bcd1c16d42 Mon Sep 17 00:00:00 2001 From: Nathan Williams Date: Sat, 29 Aug 2015 07:46:41 -0700 Subject: support service names like redis@6380 derived from units like redis@.service --- lib/chef/platform/service_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/chef/platform') 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 -- cgit v1.2.1