Skip to content

Commit

Permalink
Merge pull request #37 from linuxserver/quiet-migration
Browse files Browse the repository at this point in the history
only run migration if conf exists
  • Loading branch information
nemchik authored Nov 28, 2023
2 parents 98a07c9 + 79024a6 commit 0809661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion root/migrations/02-default-location
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DEFAULT_CONF="/config/nginx/site-confs/default.conf"
OLD_ROOT="root /app/projectsend;"
NEW_ROOT="root /app/www/public;"

if [[ -f "${DEFAULT_CONF}" ]] && 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

0 comments on commit 0809661

Please sign in to comment.