Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
Move interpolation out of the execute block as chef doesn't seem to h…
Browse files Browse the repository at this point in the history
…andle this as you might expect
  • Loading branch information
olbrich committed Aug 19, 2021
1 parent 769cb76 commit ac289e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/drivers_appserver_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ def restart_monit
# If an instance fails to start, the adapter process may not exist
# and trying to unmonitor it might fail.
def unmonitor_monit
monit_status = "monit status | grep -q #{adapter}_#{app['shortname']}"
context.execute "monit unmonitor #{adapter}_#{app['shortname']}" do
retries 3
only_if "monit status | grep -q #{adapter}_#{app['shortname']}"
only_if monit_status
end
end

Expand Down

0 comments on commit ac289e4

Please sign in to comment.