Files
dokku/plugins/nginx-vhosts/commands
2016-04-25 17:37:50 -07:00

34 lines
963 B
Bash
Executable File

#!/usr/bin/env bash
[[ " help nginx:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$1" in
help | nginx:help)
help_content_func () {
declare desc="return nginx plugin help content"
cat<<help_content
nginx, Interact with Dokku's Nginx proxy
nginx:build-config <app>, (Re)builds nginx config for given app
nginx:access-logs <app> [-t], Show the nginx access logs for an application (-t follows)
nginx:error-logs <app> [-t], Show the nginx error logs for an application (-t follows)
help_content
}
if [[ $1 = "nginx:help" ]] ; then
echo -e 'Usage: dokku nginx[:COMMAND]'
echo ''
echo 'Interact with Dokku'"'"'s Nginx proxy.'
echo ''
echo 'Additional commands:'
help_content_func | sort | column -c2 -t -s,
else
help_content_func
fi
;;
*)
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
;;
esac