Per subject, using Chef 0.9.8. I'm a bit miffed.script "wait for pgsql startup" dointerpreter "bash"user "postgres"group "postgres"path ["#{node[:postgresql90][:pgbin]}", "/bin", "/usr/bin"]code <<-EOHretries=0while (( $retries < 10 )); doif psql -U postgres template1 </dev/null ; thenexit 0firetries=$(( retries + 1 ))sleep 1doneexit 1EOHaction :nothingendservice "postgresql-9.0" doaction [ :enable, :start ]notifies :run, "script[wait for pgsql startup]", :immediateend# ... other things happening below here need the database to be actually available
Archive powered by MHonArc 2.6.16.