diff --git a/le b/le index 42d10fd..fc08e1e 100755 --- a/le +++ b/le @@ -42,6 +42,18 @@ gen_renew_config() { printf ')\n' } +usage() { + while read -r line; do printf '%s\n' "$line"; done <<- EOF + Usage: le [options] <-d domain> [-d domain] ... + Options: + -c # Configuration directory. Default: \$HOME/.acme + -a # A dir to put challenges in. Default: /tmp/acme/challenges + -d # Domain to issue the certificate for. + # Can be specified multiple time for multi-domain certs. + -h # Show this message. + EOF +} + main() { declare cfg_dir declare -a domains @@ -60,6 +72,10 @@ main() { domains+=( "$2" ) shift;; + -h) + usage + return 0;; + --) shift break;; diff --git a/le-renew b/le-renew index e43a6f5..8ccf9b5 100755 --- a/le-renew +++ b/le-renew @@ -16,6 +16,17 @@ set_default() { fi } +usage() { + while read -r line; do printf '%s\n' "$line"; done <<- EOF + Usage: le [options] <-d domain> [-d domain] ... + Options: + -c # Configuration directory. Default: \$HOME/.acme + -t # 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() { declare cfg_dir declare -a domains le_args @@ -30,9 +41,9 @@ main() { checkend_seconds=$2 shift;; - -d) - domains+=( "$2" ) - shift;; + -h) + usage + return 0;; --) shift