correct code

This commit is contained in:
Alexandre
2021-10-31 17:25:08 +01:00
parent 07e2d9d3ff
commit b6e4d6ef2c

View File

@@ -28,9 +28,9 @@ if [ -f ${JSONTOCHECK} ]; then
#Fetch initial value
JSONSOURCEVALUE=$(jq -r ".\"$KEYS\"" ${JSONSOURCE})
#Add key
sed -i "3 i\"${KEYS}\": \"${JSONSOURCEVALUE}\"}," ${JSONTOCHECK}
sed -i "3 i\"${KEYS}\": \"${JSONSOURCEVALUE}\"," ${JSONTOCHECK}
# Message
bashio::log.warning "$KEYS was missing from your settings.json, it was added with the default value ${JSONSOURCEVALUE}"
bashio::log.warning "${KEYS} was missing from your settings.json, it was added with the default value ${JSONSOURCEVALUE}"
fi
done