mirror of
https://github.com/linuxserver/docker-nextcloud.git
synced 2026-02-19 23:03:50 +08:00
only run migration if conf exists
redirect stderr to /dev/null Signed-off-by: Eric Nemchik <eric@nemchik.com>
This commit is contained in:
parent
f62cc3b9e8
commit
be9ffb890e
@ -5,7 +5,7 @@ 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
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user