From e7e249d1d3016f4ae06557ee11216e491e95b78b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 29 Mar 2016 23:31:03 -0400 Subject: [PATCH] Ensure we release the trap avoid running cleanup twice --- plugins/checks/check-deploy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/checks/check-deploy b/plugins/checks/check-deploy index b0ce97af4..8f2b20d64 100755 --- a/plugins/checks/check-deploy +++ b/plugins/checks/check-deploy @@ -58,7 +58,7 @@ checks_check_deploy() { eval "$(config_export global)" eval "$(config_export app "$APP")" - if [[ "$(is_app_checks_enabled "$APP")" == "false" ]];then + if [[ "$(is_app_checks_enabled "$APP")" == "false" ]]; then dokku_log_info2_quiet "Zero downtime checks for app ($APP) have been disabled. moving on..." exit 0 fi @@ -115,6 +115,7 @@ checks_check_deploy() { dokku_log_fail "App container failed to start!!" fi + trap - EXIT dokku_log_info1 "Default container check successful!" && exit 0 fi @@ -231,6 +232,7 @@ checks_check_deploy() { exit 1 fi + trap - EXIT dokku_log_info1 "All checks successful!" }