diff --git a/plugins/nginx-vhosts/core-post-deploy b/plugins/nginx-vhosts/core-post-deploy index 2cead5075..0a65dd3ad 100755 --- a/plugins/nginx-vhosts/core-post-deploy +++ b/plugins/nginx-vhosts/core-post-deploy @@ -18,8 +18,8 @@ trigger-nginx-vhosts-core-post-deploy() { if [[ "$HAS_NETWORK_CONFIG" == "true" ]]; then plugn trigger domains-setup "$APP" nginx_build_config "$APP" - if [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/upcoming.nginx.conf.sigil" ]]; then - mv "${DOKKU_LIB_ROOT}/data/nginx-vhosts/upcoming.nginx.conf.sigil" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/nginx.conf.sigil" + if [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-upcoming.nginx.conf.sigil" ]]; then + mv "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-upcoming.nginx.conf.sigil" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-nginx.conf.sigil" fi fi } diff --git a/plugins/nginx-vhosts/core-post-extract b/plugins/nginx-vhosts/core-post-extract index eb4327a19..bf3fe9ed9 100755 --- a/plugins/nginx-vhosts/core-post-extract +++ b/plugins/nginx-vhosts/core-post-extract @@ -20,8 +20,8 @@ trigger-nginx-vhosts-core-post-extract() { return fi - rm -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/upcoming.nginx.conf.sigil" - cp -f "$CONF_SIGIL_PATH" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/upcoming.nginx.conf.sigil" + rm -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-upcoming.nginx.conf.sigil" + cp -f "$CONF_SIGIL_PATH" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-upcoming.nginx.conf.sigil" popd &>/dev/null || pushd "/tmp" >/dev/null } diff --git a/plugins/nginx-vhosts/functions b/plugins/nginx-vhosts/functions index 8768db66a..87f25d510 100755 --- a/plugins/nginx-vhosts/functions +++ b/plugins/nginx-vhosts/functions @@ -190,10 +190,10 @@ get_custom_nginx_template() { return fi - if [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/upcoming.nginx.conf.sigil" ]]; then - cp "${DOKKU_LIB_ROOT}/data/nginx-vhosts/upcoming.nginx.conf.sigil" "$DESTINATION_FILE" - elif [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/nginx.conf.sigil" ]]; then - cp "${DOKKU_LIB_ROOT}/data/nginx-vhosts/nginx.conf.sigil" "$DESTINATION_FILE" + if [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-upcoming.nginx.conf.sigil" ]]; then + cp "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-upcoming.nginx.conf.sigil" "$DESTINATION_FILE" + elif [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-nginx.conf.sigil" ]]; then + cp "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-nginx.conf.sigil" "$DESTINATION_FILE" fi }