docker-nextcloud/root/migrations/02-default-location
Eric Nemchik 21291a365f
Move Nextcloud installation inside container
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-06-06 14:37:17 -05:00

12 lines
335 B
Plaintext

#!/usr/bin/with-contenv bash
# shellcheck shell=bash
DEFAULT_CONF="/config/nginx/site-confs/default.conf"
OLD_ROOT="root /config/www/nextcloud/;"
NEW_ROOT="root /app/www/public;"
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}"; then
echo "updating root in ${DEFAULT_CONF}"
sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}"
fi