21 lines
586 B
Bash
Executable File
21 lines
586 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
source "$PLUGIN_AVAILABLE_PATH/apps/functions"
|
|
|
|
cmd-apps-destroy() {
|
|
declare desc="destroys an app"
|
|
declare cmd="apps:destroy"
|
|
[[ "$1" == "$cmd" ]] && shift 1
|
|
declare APP="$1" FORCE="$2"
|
|
|
|
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
|
[[ "$APP" == "tls" ]] && dokku_log_fail "Unable to destroy tls directory"
|
|
[[ "$FORCE" == "force" ]] && export DOKKU_APPS_FORCE_DELETE=1
|
|
|
|
apps_destroy "$APP"
|
|
}
|
|
|
|
cmd-apps-destroy "$@"
|