mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 21:04:05 +02:00
correct code
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user