fix review and switch DOKKU_NGINX to DOKKU_PROXY in scripts/docs

This commit is contained in:
Alexis Tyler
2017-07-03 10:59:07 +09:30
committed by Jose Diaz-Gonzalez
parent 7095eac052
commit 4c3a0801f7
10 changed files with 26 additions and 40 deletions

View File

@@ -9,15 +9,15 @@ nginx_post_certs_update() {
local trigger="nginx_post_certs_update"
local APP="$1"
if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then
local DOKKU_NGINX_PORT=$(config_get "$APP" DOKKU_NGINX_PORT)
local DOKKU_NGINX_SSL_PORT=$(config_get "$APP" DOKKU_NGINX_SSL_PORT)
local DOKKU_NGINX_PORT=$(config_get "$APP" DOKKU_PROXY_PORT)
local DOKKU_NGINX_SSL_PORT=$(config_get "$APP" DOKKU_PROXY_SSL_PORT)
local DOKKU_PROXY_PORT_MAP=$(config_get "$APP" DOKKU_PROXY_PORT_MAP)
if [[ "$DOKKU_NGINX_PORT" == "80" ]]; then
config_unset --no-restart "$APP" DOKKU_NGINX_PORT
if [[ "$DOKKU_PROXY_PORT" == "80" ]]; then
config_unset --no-restart "$APP" DOKKU_PROXY_PORT
fi
if [[ "$DOKKU_NGINX_SSL_PORT" == "443" ]]; then
config_unset --no-restart "$APP" DOKKU_NGINX_SSL_PORT
if [[ "$DOKKU_PROXY_SSL_PORT" == "443" ]]; then
config_unset --no-restart "$APP" DOKKU_PROXY_SSL_PORT
fi
if [[ "$DOKKU_PROXY_PORT_MAP" == *http:80:* ]]; then
# shellcheck disable=SC2046