Skip to content

Commit 976de47

Browse files
authored
Merge pull request #197 from linuxserver/quiet-migration
only run migration if conf exists
2 parents 152f64b + a6801f2 commit 976de47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: root/migrations/02-default-location

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DEFAULT_CONF="/config/nginx/site-confs/default.conf"
55
OLD_ROOT="root /var/www/html/public;"
66
NEW_ROOT="root /app/www/public;"
77

8-
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}"; 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)