Merge pull request #3861 from dokku/3821-fix-clone-rename
Fix app clone and rename calls
This commit is contained in:
33 files changed
+570
-133
No files matched your search
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
|
||||
trigger-nginx-vhosts-post-app-clone-setup() {
|
||||
declare desc="removes nginx files when setting up a clone"
|
||||
@@ -8,6 +9,7 @@ trigger-nginx-vhosts-post-app-clone-setup() {
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
local APP_DIR="$DOKKU_ROOT/$NEW_APP"
|
||||
|
||||
fn-plugin-property-clone "nginx" "$OLD_APP" "$NEW_APP"
|
||||
rm -rf "$APP_DIR/nginx.conf"
|
||||
}
|
||||
|
||||
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/internal-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
trigger-nginx-vhosts-post-app-rename-setup() {
|
||||
declare desc="calls proxy-clear-config"
|
||||
declare trigger="post-app-rename-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "nginx" "$OLD_APP" "$NEW_APP"
|
||||
fn-plugin-property-destroy "nginx" "$OLD_APP"
|
||||
plugn trigger proxy-clear-config "$NEW_APP"
|
||||
}
|
||||
|
||||
trigger-nginx-vhosts-post-app-rename-setup "$@"
|
||||
Reference in new issue
Block a user