Files
dokku/plugins/nginx-vhosts/post-domains-update
Jose Diaz-Gonzalez b0afa778fb chore: minor cleanup
2017-10-02 15:05:13 -07:00

19 lines
598 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
nginx_post_domains_update() {
declare desc="calls nginx build_config when domains are updated"
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
}
nginx_post_domains_update "$@"