diff --git a/root/migrations/02-default-location b/root/migrations/02-default-location index 57db997..7d35cb6 100644 --- a/root/migrations/02-default-location +++ b/root/migrations/02-default-location @@ -5,7 +5,7 @@ DEFAULT_CONF="/config/nginx/site-confs/default.conf" OLD_ROOT="root /usr/share/webapps/freshrss/p;" NEW_ROOT="root /app/www/p;" -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