Fix overwriting existing values in config.json in auto

`jq` merge direction in this case is right to left so if the user had set up custom paths it would replace them with the default ones. 

This PR switches the direction to use the defaults as fallback instead of overwriting user settings.
This commit is contained in:
Mat 2023-04-22 19:20:50 +02:00 committed by GitHub
parent 2a0de025e2
commit c524d95145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ find "${ROOT}/scripts/" -maxdepth 1 -type l -delete
cp -vrfTs /data/config/auto/scripts/ "${ROOT}/scripts/"
cp -n /docker/config.json /data/config/auto/config.json
jq '. * input' /data/config/auto/config.json /docker/config.json | sponge /data/config/auto/config.json
jq '. * input' /docker/config.json /data/config/auto/config.json | sponge /data/config/auto/config.json
if [ ! -f /data/config/auto/ui-config.json ]; then
echo '{}' >/data/config/auto/ui-config.json