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.
18 lines
501 B
Bash
Executable File
18 lines
501 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
|
|
trigger-domains-post-app-rename-setup() {
|
|
declare desc="updates VHOST files during rename"
|
|
declare trigger="post-app-rename-setup"
|
|
declare OLD_APP="$1" NEW_APP="$2"
|
|
|
|
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"
|
|
done <"$DOKKU_ROOT/VHOST"
|
|
fi
|
|
}
|
|
|
|
trigger-domains-post-app-rename-setup "$@"
|