forked from dokku/dokku-letsencrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands
executable file
·45 lines (40 loc) · 1.55 KB
/
commands
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
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bash
[[ " help letsencrypt:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
case "$1" in
help | letsencrypt | letsencrypt:help)
help_content_func() {
#shellcheck disable=SC2034
declare desc="return letsencrypt plugin help content"
cat <<help_content
letsencrypt:auto-renew, Auto-renew all apps secured by letsencrypt if renewal is necessary
letsencrypt:auto-renew <app>, Auto-renew app if renewal is necessary
letsencrypt:cleanup <app>, Remove stale certificate directories for app
letsencrypt:cron-job [--add --remove], Add or remove a cron job that periodically calls auto-renew.
letsencrypt:disable <app>, Disable letsencrypt for an app
letsencrypt:enable <app>, Enable or renew letsencrypt for an app
letsencrypt:help, Display letsencrypt help
letsencrypt:list, List letsencrypt-secured apps with certificate expiry times
letsencrypt:revoke <app>, Revoke letsencrypt certificate for app
help_content
}
if [[ $1 = "letsencrypt:help" ]]; then
echo -e 'Usage: dokku letsencrypt[:COMMAND]'
echo ''
echo 'Automatically retrieve and install Lets Encrypt certificates.'
echo ''
echo 'Additional commands:'
help_content_func | sort | column -c2 -t -s,
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
help_content_func
else
cat <<help_desc
letsencrypt, Plugin for managing letsencrypt app integration
help_desc
fi
;;
*)
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
;;
esac