From d03db877348e02cdfafd5da317810b4ef9edcaa9 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sun, 31 Oct 2021 14:57:53 +0100 Subject: [PATCH] change validity check logic --- 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 429c51c22..aa0d49be5 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" # Check if json file valid or not - jq -reM '""' <<<${JSONTOCHECK} 1>/dev/null || ERROR=true + jq . -S ${JSONTOCHECK} || ERROR=true if [ $ERROR = true ]; then bashio::log.fatal "Settings.json structure is abnormal, restoring options from scratch. Your old file is renamed as settings.json_old" mv ${JSONSOURCE} ${JSONSOURCE}_old