Files
dokku/plugins/openresty-vhosts/help-functions
Jose Diaz-Gonzalez d212fd44c7 refactor: rename functions to be plural
They are plural for the scheduler-k3s plugin.
2025-11-16 18:12:28 -05:00

40 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
cmd-openresty-help() {
declare desc="help command"
declare CMD="$1"
local plugin_name="openresty"
local plugin_description="Manage the openresty proxy integration"
if [[ "$CMD" == "${plugin_name}:help" ]]; then
echo -e "Usage: dokku ${plugin_name}[:COMMAND]"
echo ''
echo "$plugin_description"
echo ''
echo 'Additional commands:'
fn-help-content | sort | column -c2 -t -s,
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
fn-help-content
else
cat <<help_desc
$plugin_name, $plugin_description
help_desc
fi
}
fn-help-content() {
declare desc="return help content"
cat <<help_content
openresty:report [<app>] [<flag>], Displays an openresty report for one or more apps
openresty:set <app> <property> (<value>), Set or clear an openresty property for an app
openresty:show-config <app>, Display openresty compose config
openresty:labels:add <app> <label> <value>, Add a label to an openresty app
openresty:labels:remove <app> <label>, Remove a label from an openresty app
openresty:labels:show <app> [<label>], Show labels for an openresty app
openresty:start, Starts the openresty server
openresty:stop, Stops the openresty server
help_content
}