Files
dokku/plugins/domains/subcommands/default
Jose Diaz-Gonzalez 54429a095c feat: implement domains:report command
Also deprecate `domains:default` in favor of `domains:report`

Refs #2356
2017-02-20 23:17:35 -07:00

33 lines
787 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/domains/functions"
domains_main_cmd() {
declare desc="print app domains"
local cmd="domains"
local APP="$2"
dokku_log_warn "Deprecated: Please use domains:report"
if [[ "$(is_global_vhost_enabled)" == "true" ]]; then
dokku_log_info2_quiet "Global Domain Name"
get_global_vhosts
fi
if [[ "$APP" == "--global" ]]; then
return
fi
if [[ -n "$APP" ]]; then
verify_app_name "$APP"
if [[ -f "$DOKKU_ROOT/$APP/VHOST" ]]; then
dokku_log_info2_quiet "$APP Domain Names"
get_app_domains "$APP"
else
dokku_log_fail "No domain names set for $APP"
fi
fi
}
domains_main_cmd "$@"