Skip to content

Commit ed2f423

Browse files
committed
Add default location migration
1 parent 32df06d commit ed2f423

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

root/migrations/02-default-location

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
DEFAULT_CONF="/config/nginx/site-confs/default.conf"
4+
OLD_ROOT="root /var/www/html/public;"
5+
NEW_ROOT="root /app/www/public;"
6+
7+
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}";then
8+
echo "updating root in ${DEFAULT_CONF}"
9+
sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}"
10+
fi

0 commit comments

Comments
 (0)