mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-27 03:03:38 +09:00
Add default location migration
This commit is contained in:
10
root/migrations/02-default-location
Normal file
10
root/migrations/02-default-location
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
DEFAULT_CONF="/config/nginx/site-confs/default.conf"
|
||||||
|
OLD_ROOT="root /var/www/localhost/heimdall/public;"
|
||||||
|
NEW_ROOT="root /app/www/public;"
|
||||||
|
|
||||||
|
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}";then
|
||||||
|
echo "updating root in ${DEFAULT_CONF}"
|
||||||
|
sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user