Merge pull request #2 from mhaskel/rhel7

Fix validate_db_connection_spec.
This commit is contained in:
Ashley Penney 2014-05-12 21:17:47 -04:00
commit 911b868bcb

View file

@ -44,7 +44,7 @@ describe 'postgresql::validate_db_connection:', :unless => UNSUPPORTED_PLATFORMS
it 'should keep retrying if database is down' do
if fact('operatingsystem') == 'RedHat' && fact('operatingsystemrelease') =~ /^7/
shell('nohup bash -c "sleep 10; for i in /usr/lib/systemd/system/postgres*; do systemctl start `basename $i`; done" > /dev/null 2>&1 &')
shell('nohup bash -c "sleep 10; systemctl start `basename /usr/lib/systemd/system/postgres*`" > /dev/null 2>&1 &')
else
shell('nohup bash -c "sleep 10; /etc/init.d/postgresql* start" > /dev/null 2>&1 &')
end