-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathhelp-functions
executable file
·35 lines (32 loc) · 1.02 KB
/
help-functions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
cmd-maintenance-help() {
declare desc="help command"
declare CMD="$1"
local plugin_name="maintenance"
local plugin_description="Manage the maintenance mode for an app"
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
maintenance:custom-page <app>, Imports a tarball from stdin; should contain at least maintenance.html
maintenance:disable <app>, Disable app maintenance mode
maintenance:enable <app>, Enable app maintenance mode
maintenance:report [<app>] [<flag>], Displays an maintenance report for one or more apps
help_content
}