Commit af67cab7 authored by Jonathan Hartman's avatar Jonathan Hartman
Browse files

Fix collector provider installation detection for 19.216-33 on Systemd platforms

This would fix #155.

As of 19.216-33, the collector uses Systemd on platforms that support it and no
longer drops off an `/etc/init.d/collector` file.

This should mean that the Systemd hack at
https://github.com/SumoLogic/sumologic-collector-chef-cookbook/blob/v1.2.23/providers/default.rb#L169
can be deleted whenever it's safe to re-break compatibility with earlier
versions of the collector.
parent 3b805283
......@@ -11,6 +11,7 @@ platforms:
- name: debian-8.7
- name: ubuntu-14.04
- name: ubuntu-16.04
- name: ubuntu-18.04
- name: windows-2008r2
driver:
box: opentable/win-2008r2-standard-amd64-nocm
......@@ -52,6 +53,7 @@ suites:
- debian-8.7
- ubuntu-14.04
- ubuntu-16.04
- ubuntu-18.04
- name: default-resource
run_list:
- recipe[default-resource]
......
......@@ -7,6 +7,9 @@ This CHANGELOG (now) follows the format listed at [Keep A Changelog](http://keep
### Changed
- delete legacy ChefSpec matchers (@RoboticCheese)
### Fixed
- fix collector provider installation detection for 19.216-33 on Systemd platforms (@RoboticCheese)
## [1.3.0] - 2018-04-19
### Added
- using node run state added as a viable option to supply credentials
......
......@@ -110,12 +110,9 @@ end
private
def installed?
case node['platform_family']
when 'windows'
::Win32::Service.exists? 'sumo-collector'
else
::File.exist? '/etc/init.d/collector'
end
path = ::File.join(new_resource.dir,
"uninstall#{'.exe' if node['platform_family'] == 'windows'}")
::File.exist?(path)
end
def installer_bin
......
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