forked from intechgrp/dokku-ssl-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands
executable file
·42 lines (37 loc) · 1.33 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
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$1" in
help | ssl-client:help)
help_content_func () {
declare desc="return help_content string"
cat<<help_content
ssl-client <app> <ca.cert, Install CA and enable SSL client authentication
ssl-client:remove <app>, Remove CA and disable SSL client authentication
ssl-client:stapling-file <app> <stapling.der, Install a stapling file and configure nginx accordingly
ssl-client:remove-stapling-file <app>, Remove an existing stapling file if any
ssl-client:add-crl <app> <crl.pem, Adds a CRL file and configure nginx accordingly
ssl-client:remove-crl <app>, Removes an existing CRL file if any
help_content
}
if [[ $1 = "ssl-client:help" ]] ; then
echo -e 'Usage: dokku ssl-client[:remove] [<app>]'
echo ''
echo 'Enable SSL client authentication on <app>.'
echo ''
echo 'Example:'
echo ''
echo '$ dokku ssl-client <ca.crt'
echo ''
echo 'The SSL client certificate must comply with the format expected by the'
echo 'ssl_client_certificate nginx directive'
echo ''
echo 'Additional commands:'
help_content_func | sort | column -c2 -t -s,
else
help_content_func
fi
;;
*)
exit $DOKKU_NOT_IMPLEMENTED_EXIT
;;
esac