Skip to content

Commit

Permalink
Fix #17: Checking postgresql status on Ubuntu
Browse files Browse the repository at this point in the history
Signed-off-by: Mahdi Fooladgar <[email protected]>
  • Loading branch information
professormahi committed Dec 8, 2023
1 parent 1bcdb4d commit bfd74b9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions controls/postgres_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,16 @@
impact 1.0
title 'Postgresql should be running'
desc 'Postgresql should be running.'
describe service(postgres.service) do
it { should be_installed }
it { should be_running }
it { should be_enabled }
if os[:name] == "ubuntu"
describe command('/etc/init.d/postgresql status') do
its('stdout') { should include 'active' }
end
else
describe service(postgres.service) do
it { should be_installed }
it { should be_running }
it { should be_enabled }
end
end
end

Expand Down

0 comments on commit bfd74b9

Please sign in to comment.