refactor: standardize help generation
This commit is contained in:
@@ -204,36 +204,6 @@ nginx_vhosts_conf_clean_func() {
|
||||
rm -f "$NGINX_CONF"
|
||||
}
|
||||
|
||||
nginx_vhosts_help_content_func() {
|
||||
declare desc="return nginx plugin help content"
|
||||
cat <<help_content
|
||||
nginx:access-logs <app> [-t], Show the nginx access logs for an application (-t follows)
|
||||
nginx:build-config <app>, (Re)builds nginx config for given app
|
||||
nginx:error-logs <app> [-t], Show the nginx error logs for an application (-t follows)
|
||||
nginx:report [<app>] [<flag>], Displays an nginx report for one or more apps
|
||||
nginx:set <app> <property> (<value>), Set or clear an nginx property for an app
|
||||
nginx:show-conf <app>, Display app nginx config
|
||||
nginx:validate [<app>] [--clean], Validates and optionally cleans up invalid nginx configurations
|
||||
help_content
|
||||
}
|
||||
|
||||
cmd-nginx-vhosts-help() {
|
||||
if [[ $1 == "nginx:help" ]]; then
|
||||
echo -e 'Usage: dokku nginx[:COMMAND]'
|
||||
echo ''
|
||||
echo 'Interact with Dokku'"'"'s Nginx proxy.'
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
nginx_vhosts_help_content_func | sort | column -c2 -t -s,
|
||||
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||
nginx_vhosts_help_content_func
|
||||
else
|
||||
cat <<help_desc
|
||||
nginx, Interact with Dokku's Nginx proxy
|
||||
help_desc
|
||||
fi
|
||||
}
|
||||
|
||||
nginx_clear_config() {
|
||||
declare desc="Remove the nginx conf file"
|
||||
declare APP="$1"
|
||||
|
||||
Reference in New Issue
Block a user