mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
add systemd service for amazon linux 2 (#2901)
* add systemd service for amazon linux 2 * inverse systemd/upstart logic for amazon service detection Signed-off-by: Zakhar Kleyman <zakhar.kleyman@mongodb.com>
This commit is contained in:
parent
46188051fa
commit
bcff97a087
1 changed files with 5 additions and 1 deletions
|
@ -162,7 +162,11 @@ module Inspec::Resources
|
|||
elsif %w{aix}.include?(platform)
|
||||
SrcMstr.new(inspec)
|
||||
elsif %w{amazon}.include?(platform)
|
||||
Upstart.new(inspec, service_ctl)
|
||||
if os[:release].start_with?('20\d\d')
|
||||
Upstart.new(inspec, service_ctl)
|
||||
else
|
||||
Systemd.new(inspec, service_ctl)
|
||||
end
|
||||
elsif os.solaris?
|
||||
Svcs.new(inspec)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue