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 #Fetch initial value
JSONSOURCEVALUE=$(jq -r ".\"$KEYS\"" ${JSONSOURCE}) JSONSOURCEVALUE=$(jq -r ".\"$KEYS\"" ${JSONSOURCE})
#Add key #Add key
sed -i "3 i\"${KEYS}\": \"${JSONSOURCEVALUE}\"}," ${JSONTOCHECK} sed -i "3 i\"${KEYS}\": \"${JSONSOURCEVALUE}\"," ${JSONTOCHECK}
# Message # 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 fi
done done