fix: only rename app domains associated with a global domain
Closes #4965
This commit is contained in:
@@ -7,11 +7,12 @@ trigger-domains-post-app-rename-setup() {
|
||||
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
|
||||
rm -f "$DOKKU_ROOT/$NEW_APP/URLS"
|
||||
|
||||
if [[ -f "$DOKKU_ROOT/$NEW_APP/VHOST" ]]; then
|
||||
sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/VHOST"
|
||||
while read -r VHOST || [[ -n "$VHOST" ]]; do
|
||||
sed -i -e "s/$OLD_APP.$VHOST/$NEW_APP.$VHOST/g" "$DOKKU_ROOT/$NEW_APP/VHOST"
|
||||
done <"$DOKKU_ROOT/VHOST"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user