Files
docker-heimdall/root/migrations/02-default-location
2024-06-27 16:33:46 +01:00

12 lines
389 B
Plaintext
Executable File

#!/usr/bin/with-contenv bash
# shellcheck shell=bash
DEFAULT_CONF="/config/nginx/site-confs/default.conf"
OLD_ROOT="root /var/www/localhost/heimdall/public;"
NEW_ROOT="root /app/www/public;"
if [[ -f "${DEFAULT_CONF}" ]] && grep -q "${OLD_ROOT}" "${DEFAULT_CONF}" 2>/dev/null; then
echo "updating root in ${DEFAULT_CONF}"
sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}"
fi