Skip to content

Commit 4b81ec5

Browse files
authored
Merge pull request #31 from linuxserver/quiet-migration
only run migration if conf exists
2 parents 6fd7e54 + ca685c3 commit 4b81ec5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

root/migrations/02-default-location

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DEFAULT_CONF="/config/nginx/site-confs/default.conf"
55
OLD_ROOT="root /app/phpmyadmin;"
66
NEW_ROOT="root /app/www/public;"
77

8-
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}" 2>/dev/null; then
8+
if [[ -f "${DEFAULT_CONF}" ]] && grep -q "${OLD_ROOT}" "${DEFAULT_CONF}" 2>/dev/null; then
99
echo "updating root in ${DEFAULT_CONF}"
1010
sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}"
1111
fi

0 commit comments

Comments
 (0)