2016-02-14 18:43:40 -08:00
|
|
|
#!/usr/bin/env bash
|
2019-01-07 01:04:17 -05:00
|
|
|
set -eo pipefail
|
|
|
|
|
[[ $DOKKU_TRACE ]] && set -x
|
2016-02-14 18:43:40 -08:00
|
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
|
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
|
|
|
|
|
2016-05-09 16:03:07 -07:00
|
|
|
is_app_proctype_checks_disabled() {
|
|
|
|
|
declare desc="return true if app's proctype(s) checks are disabled"
|
2019-01-07 01:04:17 -05:00
|
|
|
local APP="$1"
|
2016-05-09 16:03:07 -07:00
|
|
|
local PROCTYPE="$2" status=false
|
|
|
|
|
local DOKKU_CHECKS_DISABLED=$(config_get "$APP" DOKKU_CHECKS_DISABLED || true)
|
2016-02-14 18:43:40 -08:00
|
|
|
|
2019-01-07 01:04:17 -05:00
|
|
|
if [[ "$DOKKU_CHECKS_DISABLED" == "_all_" ]] || [[ "$(is_val_in_list "$PROCTYPE" "$DOKKU_CHECKS_DISABLED")" == "true" ]]; then
|
2016-05-09 16:03:07 -07:00
|
|
|
status=true
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo $status
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
is_app_proctype_checks_skipped() {
|
|
|
|
|
declare desc="return true if app's proctype(s) checks are skipped"
|
2019-01-07 01:04:17 -05:00
|
|
|
local APP="$1"
|
2016-05-09 16:03:07 -07:00
|
|
|
local PROCTYPE="$2" status=false
|
|
|
|
|
local DOKKU_CHECKS_SKIPPED=$(config_get "$APP" DOKKU_CHECKS_SKIPPED || true)
|
|
|
|
|
|
2019-01-07 01:04:17 -05:00
|
|
|
if [[ "$DOKKU_CHECKS_SKIPPED" == "_all_" ]] || [[ "$(is_val_in_list "$PROCTYPE" "$DOKKU_CHECKS_SKIPPED")" == "true" ]]; then
|
2016-05-09 16:03:07 -07:00
|
|
|
status=true
|
2016-02-14 18:43:40 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo $status
|
|
|
|
|
}
|