Commit b45accd6 authored by Tim Smith's avatar Tim Smith
Browse files

Merge pull request #89 from fjg/fix-ubuntu-service-provider

fix(provider): since Ubuntu 15.04 should use Systemd
parents 0595dc43 d0584032
module RsyslogCookbook module RsyslogCookbook
# helpers for the various service providers on Ubuntu systems # helpers for the various service providers on Ubuntu systems
module Helpers module Helpers
def declare_rsyslog_service def declare_rsyslog_service
if node['platform'] == 'ubuntu' && node['platform_version'].to_f >= 12.04 if 'ubuntu' == node['platform']
service_provider = Chef::Provider::Service::Upstart if'>= 15.04').include?(node['platform_version'])
else service_provider = Chef::Provider::Service::Systemd
service_provider = nil elsif'>= 12.04').include?(node['platform_version'])
end service_provider = Chef::Provider::Service::Upstart
service node['rsyslog']['service_name'] do service_provider = nil
supports :restart => true, :status => true end
action [:enable, :start] end
provider service_provider
end service 'rsyslog' do
end service_name node['rsyslog']['service_name']
end supports :restart => true, :status => true
action [:enable, :start]
provider service_provider
end end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment