Merge pull request #3861 from dokku/3821-fix-clone-rename

Fix app clone and rename calls
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2020-02-18 00:42:25 -05:00
commit 9f32747c98
33 files changed
+570 -133

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-domains-post-app-rename-setup() {
declare desc="updates VHOST and URLS files during rename"
declare trigger="post-app-rename-setup"
declare OLD_APP="$1" NEW_APP="$2"
if [[ -f "$DOKKU_ROOT/$NEW_APP/URLS" ]]; then
sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/URLS"
fi
if [[ -f "$DOKKU_ROOT/$NEW_APP/VHOST" ]]; then
sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/VHOST"
fi
}
trigger-domains-post-app-rename-setup "$@"