mirror of
https://github.com/inspec/inspec
synced 2024-11-26 14:40:26 +00:00
CFINSPEC-78: Add be_running matcher for the resource
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
parent
bef163f75b
commit
117c9230e9
1 changed files with 6 additions and 1 deletions
|
@ -42,7 +42,12 @@ module Inspec::Resources
|
|||
end
|
||||
|
||||
def running?
|
||||
true
|
||||
auditctl_cmd = inspec.command("#{auditctl_utility} -s | grep pid")
|
||||
|
||||
raise Inspec::Exceptions::ResourceFailed, "Executing #{auditctl_utility} -s | grep enabled failed: #{auditctl_cmd.stderr}" if auditctl_cmd.exit_status.to_i != 0
|
||||
|
||||
auditctl_running_status = auditctl_cmd.stdout.strip.split
|
||||
!auditctl_running_status[1].nil? && auditctl_running_status[1].to_i != 0
|
||||
end
|
||||
|
||||
def rules
|
||||
|
|
Loading…
Reference in a new issue