We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 152f64b + a6801f2 commit 976de47Copy full SHA for 976de47
root/migrations/02-default-location
@@ -5,7 +5,7 @@ DEFAULT_CONF="/config/nginx/site-confs/default.conf"
5
OLD_ROOT="root /var/www/html/public;"
6
NEW_ROOT="root /app/www/public;"
7
8
-if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}"; then
+if [[ -f "${DEFAULT_CONF}" ]] && grep -q "${OLD_ROOT}" "${DEFAULT_CONF}" 2>/dev/null; then
9
echo "updating root in ${DEFAULT_CONF}"
10
sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}"
11
fi
0 commit comments