subcommand restructure and bashstyle refactor. closes #1579
This commit is contained in:
committed by
Michael Hobbs
parent
76e27f0333
commit
89f289b433
26
plugins/domains/subcommands/default
Executable file
26
plugins/domains/subcommands/default
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/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() {
|
||||
local desc="print app domains"
|
||||
local cmd="domains"
|
||||
local APP="$2"
|
||||
|
||||
if [[ "$(is_global_vhost_enabled)" == "true" ]]; then
|
||||
dokku_log_info2_quiet "Global Domain Name"
|
||||
get_global_vhost
|
||||
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 "$@"
|
||||
Reference in New Issue
Block a user