Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2016-05-31 02:48:21 +03:00
parent f5b697dbea
commit a919c17dee
2 changed files with 30 additions and 3 deletions

16
le
View File

@ -42,6 +42,18 @@ gen_renew_config() {
printf ')\n' printf ')\n'
} }
usage() {
while read -r line; do printf '%s\n' "$line"; done <<- EOF
Usage: le [options] <-d domain> [-d domain] ...
Options:
-c <dir> # Configuration directory. Default: \$HOME/.acme
-a <dir> # A dir to put challenges in. Default: /tmp/acme/challenges
-d <domain> # Domain to issue the certificate for.
# Can be specified multiple time for multi-domain certs.
-h # Show this message.
EOF
}
main() { main() {
declare cfg_dir declare cfg_dir
declare -a domains declare -a domains
@ -60,6 +72,10 @@ main() {
domains+=( "$2" ) domains+=( "$2" )
shift;; shift;;
-h)
usage
return 0;;
--) --)
shift shift
break;; break;;

View File

@ -16,6 +16,17 @@ set_default() {
fi fi
} }
usage() {
while read -r line; do printf '%s\n' "$line"; done <<- EOF
Usage: le [options] <-d domain> [-d domain] ...
Options:
-c <dir> # Configuration directory. Default: \$HOME/.acme
-t <sec> # How many seconds till exipration to consider as soon. Default: 259200 (3 days)
# Can be specified multiple time for multi-domain certs.
-h # Show this message.
EOF
}
main() { main() {
declare cfg_dir declare cfg_dir
declare -a domains le_args declare -a domains le_args
@ -30,9 +41,9 @@ main() {
checkend_seconds=$2 checkend_seconds=$2
shift;; shift;;
-d) -h)
domains+=( "$2" ) usage
shift;; return 0;;
--) --)
shift shift