mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-26 10:33:40 +02:00
Update entrypoint.sh
This commit is contained in:
@@ -9,14 +9,18 @@ echo "Starting..."
|
|||||||
# For all keys in options.json
|
# For all keys in options.json
|
||||||
JSONSOURCE="/data/options.json"
|
JSONSOURCE="/data/options.json"
|
||||||
|
|
||||||
|
|
||||||
# Export keys as env variables
|
# Export keys as env variables
|
||||||
echo "All addon options were exported as variables"
|
echo "All addon options were exported as variables"
|
||||||
mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE})
|
mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE})
|
||||||
for KEYS in ${arr[@]}; do
|
for KEYS in ${arr[@]}; do
|
||||||
# export key
|
# export key
|
||||||
|
VALUE=$(jq .$KEYS ${JSONSOURCE})
|
||||||
|
export ${KEYS}=${VALUE:1:-1}
|
||||||
export $(echo "${KEYS}=$(jq .$KEYS ${JSONSOURCE})")
|
export $(echo "${KEYS}=$(jq .$KEYS ${JSONSOURCE})")
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
################
|
################
|
||||||
# Set timezone #
|
# Set timezone #
|
||||||
################
|
################
|
||||||
|
|||||||
Reference in New Issue
Block a user