Skip to content

Commit

Permalink
Revert "Add DOKKU_LETSENCRYPT_TOS_HASH"
Browse files Browse the repository at this point in the history
This reverts commit a849254.
  • Loading branch information
sseemayer committed Aug 2, 2016
1 parent a849254 commit 9e1bdcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,11 @@ Once the certificate is installed, you can use the `certs:*` built-in commands t
## Configuration
`dokku-letsencrypt` uses the [Dokku environment variable manager](http://dokku.viewdocs.io/dokku/configuration-management/) for all configuration. The important environment variables are:

Variable | Default | Description
--------------------------------|-----------------------|---------------------------------------------------------------------------------
`DOKKU_LETSENCRYPT_EMAIL` | (none) | **REQUIRED:** E-mail address to use for registering with Let's Encrypt.
`DOKKU_LETSENCRYPT_GRACEPERIOD` | 30 days | Time in seconds left on a certificate before it should get renewed
`DOKKU_LETSENCRYPT_SERVER` | default | Which ACME server to use. Can be 'default', 'staging' or a URL
`DOKKU_LETSENCRYPT_TOS_HASH` | (simp\_le-controlled) | Set the SHA256 hash of the let's encrypt terms of service version you agree to.
Variable | Default | Description
--------------------------------|-------------|-------------------------------------------------------------------------
`DOKKU_LETSENCRYPT_EMAIL` | (none) | **REQUIRED:** E-mail address to use for registering with Let's Encrypt.
`DOKKU_LETSENCRYPT_GRACEPERIOD` | 30 days | Time in seconds left on a certificate before it should get renewed
`DOKKU_LETSENCRYPT_SERVER` | default | Which ACME server to use. Can be 'default', 'staging' or a URL

You can set a setting using `dokku config:set --no-restart <myapp> SETTING_NAME=setting_value`. When looking for a setting, the plugin will first look if it was defined for the current app and fall back to settings defined by `--global`.

Expand Down
9 changes: 1 addition & 8 deletions functions
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,6 @@ letsencrypt_configure_and_get_dir() {
server="https://acme-staging.api.letsencrypt.org/directory"
fi

# get the selected terms of service (TOS) hash
local tos_hash=${DOKKU_LETSENCRYPT_TOS_HASH}
local tos_hash_arg=''
if [ ! -z "$tos_hash" ]; then
tos_hash_arg="--tos_sha256 $tos_hash "
fi

# construct domain arguments
local domains="$(get_app_domains "$app")"
local domain_args=''
Expand All @@ -156,7 +149,7 @@ letsencrypt_configure_and_get_dir() {
domain_args="$domain_args -d $domain"
done

local config="--server $server --email $DOKKU_LETSENCRYPT_EMAIL ${tos_hash_arg}${domain_args}"
local config="--server $server --email $DOKKU_LETSENCRYPT_EMAIL $domain_args"

local config_hash=$(echo "$config" | sha1sum | awk '{print $1}')
local config_dir="$le_root/certs/$config_hash"; mkdir -p "$config_dir"
Expand Down

1 comment on commit 9e1bdcd

@tonyspiro
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a fix for #73 in the works?

Please sign in to comment.