This commit is contained in:
Alexandre
2021-10-31 13:59:59 +01:00
parent a9302a9465
commit fb7f45e5af

View File

@@ -9,7 +9,7 @@ if [ -f ${JSONTOCHECK} ]; then
echo "Checking settings.json format"
# Get the default keys from the original file
mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE})
mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE}) || (echo "structure is abnormal, restarting database from scratch" && cp ${JSONSOURCE} ${JSONTOCHECK})
# Check if all keys are still there, or add them
for KEYS in ${arr[@]}; do