From 34d248a28cefc76a431ee069ba9e503a59581198 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 27 Dec 2018 04:59:22 -0500 Subject: [PATCH] fix: remove old nginx.conf from a new app on clone --- plugins/nginx-vhosts/post-app-clone-setup | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 plugins/nginx-vhosts/post-app-clone-setup diff --git a/plugins/nginx-vhosts/post-app-clone-setup b/plugins/nginx-vhosts/post-app-clone-setup new file mode 100755 index 000000000..194e03106 --- /dev/null +++ b/plugins/nginx-vhosts/post-app-clone-setup @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x + +nginx_post_app_clone_setup() { + declare desc="removes nginx files when setting up a clone" + declare OLD_APP="$1" NEW_APP="$2" + local APP_DIR="$DOKKU_ROOT/$NEW_APP" + + rm -rf "$APP_DIR/nginx.conf" +} + +nginx_post_app_clone_setup "$@"