From b0afa778fbdf9ea631ec05e3317d6cd1a77a3aef Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 22 Apr 2017 15:52:08 -0600 Subject: [PATCH] chore: minor cleanup --- plugins/nginx-vhosts/post-domains-update | 9 ++++++--- plugins/nginx-vhosts/proxy-build-config | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/nginx-vhosts/post-domains-update b/plugins/nginx-vhosts/post-domains-update index 6201175b7..29a590963 100755 --- a/plugins/nginx-vhosts/post-domains-update +++ b/plugins/nginx-vhosts/post-domains-update @@ -6,9 +6,12 @@ source "$PLUGIN_AVAILABLE_PATH/proxy/functions" nginx_post_domains_update() { declare desc="calls nginx build_config when domains are updated" - local trigger="nginx_post_domains_update" - if [[ "$(get_app_proxy_type "$1")" == "nginx" ]]; then - nginx_build_config "$1" + declare trigger="nginx_post_domains_update" + declare APP="$1" + [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" + + if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then + nginx_build_config "$APP" fi } diff --git a/plugins/nginx-vhosts/proxy-build-config b/plugins/nginx-vhosts/proxy-build-config index 358fa1997..0253f7181 100755 --- a/plugins/nginx-vhosts/proxy-build-config +++ b/plugins/nginx-vhosts/proxy-build-config @@ -6,10 +6,11 @@ source "$PLUGIN_AVAILABLE_PATH/proxy/functions" nginx_proxy_build_config() { declare desc="build nginx config to proxy app containers from command line" + declare trigger="nginx_proxy_build_config" declare APP="$1" [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" - if [[ "$(get_app_proxy_type "$1")" = "nginx" ]]; then + if [[ "$(get_app_proxy_type "$APP")" = "nginx" ]]; then plugn trigger network-build-config "$APP" nginx_build_config "$APP" fi