2020-07-18 18:23:58 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
control 'apache service' do
|
|
|
|
impact 0.5
|
|
|
|
title 'should be running and enabled'
|
|
|
|
|
2020-07-18 18:26:39 +02:00
|
|
|
service_name =
|
|
|
|
case platform[:family]
|
|
|
|
when 'debian', 'suse'
|
|
|
|
'apache2'
|
|
|
|
when 'redhat', 'fedora', 'linux'
|
|
|
|
'httpd'
|
|
|
|
end
|
|
|
|
|
2020-07-18 18:23:58 +02:00
|
|
|
describe service(service_name) do
|
|
|
|
it { should be_enabled }
|
|
|
|
it { should be_running }
|
|
|
|
end
|
|
|
|
end
|