#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"

cmd-domains-clear-global() {
  declare desc="clear global domain names"
  declare cmd="domains:clear-global"
  [[ "$1" == "$cmd" ]] && shift 1

  dokku_log_info1_quiet "Clearing global domains"
  domains_clear_global "$@"
}

cmd-domains-clear-global "$@"
