From fb7f45e5af8c13f7bcd77340c456312d9acce2ff Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sun, 31 Oct 2021 13:59:59 +0100 Subject: [PATCH] update --- transmission/rootfs/etc/cont-init.d/19-json_repair.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmission/rootfs/etc/cont-init.d/19-json_repair.sh b/transmission/rootfs/etc/cont-init.d/19-json_repair.sh index 0dc21638d..8d382c088 100644 --- a/transmission/rootfs/etc/cont-init.d/19-json_repair.sh +++ b/transmission/rootfs/etc/cont-init.d/19-json_repair.sh @@ -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