Files
dokku/plugins/domains/internal-functions
2017-02-20 22:50:07 -07:00

36 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
domains_help_content_func () {
declare desc="return domains plugin help content"
cat<<help_content
domains [<app>], List domains
domains:add <app> <domain> [<domain> ...], Add domains to app
domains:add-global <domain> [<domain> ...], Add global domain names
domains:clear <app>, Clear all domains for app
domains:disable <app>, Disable VHOST support
domains:enable <app>, Enable VHOST support
domains:remove <app> <domain> [<domain> ...], Remove domains from app
domains:remove-global <domain> [<domain> ...], Remove global domain names
domains:set <app> <domain> [<domain> ...], Set domains for app
domains:set-global <domain> [<domain> ...], Set global domain names
help_content
}
domains_help_cmd() {
if [[ $1 = "domains:help" ]] ; then
echo -e 'Usage: dokku domains[:COMMAND]'
echo ''
echo 'Manage vhost domains used by the Dokku proxy.'
echo ''
echo 'Additional commands:'
domains_help_content_func | sort | column -c2 -t -s,
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
domains_help_content_func
else
cat<<help_desc
domains, Manage vhost domains used by the Dokku proxy
help_desc
fi
}