Update 19-json_repair.sh

This commit is contained in:
Alexandre
2023-01-08 19:55:06 +01:00
committed by GitHub
parent f76eb89bc0
commit 88edb67f9c

View File

@@ -11,7 +11,7 @@ if [ -f "${JSONTOCHECK}" ]; then
# Check if json file valid or not
jq . -S "${JSONTOCHECK}" &>/dev/null && ERROR=false || ERROR=true
if [ $ERROR = true ]; then
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
cp "${JSONSOURCE}" "${JSONTOCHECK}"