mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Update 19-json_repair.sh
This commit is contained in:
@@ -42,13 +42,3 @@ if [ -f ${JSONTOCHECK} ]; then
|
|||||||
# Message
|
# Message
|
||||||
bashio::log.info "Your settings.json was checked and seems perfectly normal!"
|
bashio::log.info "Your settings.json was checked and seems perfectly normal!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Repair structure
|
|
||||||
################
|
|
||||||
#jq . -S $CONFIGDIR/settings.json | cat >temp.json && mv temp.json $CONFIGDIR/settings.json
|
|
||||||
#echo "Making sure settings.json structure is good"
|
|
||||||
#for KEYS in "incomplete-dir" "download-dir" "rpc-host-whitelist-enabled" "rpc-authentication-required" "rpc-username" "rpc-password" "rpc-whitelist-enabled" "rpc-whitelist"; do
|
|
||||||
# KEYSTHERE=$(jq "has(\"${KEYS}\")" $CONFIGDIR/settings.json)
|
|
||||||
# [ "$KEYSTHERE" != "true" ] && sed -i "3 i\"${KEYS}\": null," $CONFIGDIR/settings.json && echo "... $KEYS was missing, added"
|
|
||||||
#done
|
|
||||||
#jq . -S $CONFIGDIR/settings.json | cat >temp.json && mv temp.json $CONFIGDIR/settings.json
|
|
||||||
|
|||||||
Reference in New Issue
Block a user