refactor: simplify how url generation works
The URLS file is no longer necessary as urls are now generated directly from the app VHOST file. This also moves all the url generation logic to the domains plugin.
This commit is contained in:
@@ -3,12 +3,10 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-domains-post-app-rename-setup() {
|
||||
declare desc="updates VHOST and URLS files during rename"
|
||||
declare desc="updates VHOST files during rename"
|
||||
declare trigger="post-app-rename-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
rm -f "$DOKKU_ROOT/$NEW_APP/URLS"
|
||||
|
||||
if [[ -f "$DOKKU_ROOT/$NEW_APP/VHOST" ]]; then
|
||||
while read -r VHOST || [[ -n "$VHOST" ]]; do
|
||||
sed -i -e "s/$OLD_APP.$VHOST/$NEW_APP.$VHOST/g" "$DOKKU_ROOT/$NEW_APP/VHOST"
|
||||
|
||||
Reference in New Issue
Block a user