mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-10 09:35:58 +02:00
Update entrypoint.sh
This commit is contained in:
@@ -1,5 +1,24 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
###################################
|
||||||
|
# Export all addon options as env #
|
||||||
|
###################################
|
||||||
|
|
||||||
|
# For all keys in options.json
|
||||||
|
JSONSOURCE="/data/options.json"
|
||||||
|
|
||||||
|
# Export keys as env variables
|
||||||
|
mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE})
|
||||||
|
for KEYS in ${arr[@]}; do
|
||||||
|
# export key
|
||||||
|
export $(echo "${KEYS}=$(jq .$KEYS ${JSONSOURCE})")
|
||||||
|
echo "All addon configs exported as env variables"
|
||||||
|
done
|
||||||
|
|
||||||
|
####################
|
||||||
|
# Starting scripts #
|
||||||
|
####################
|
||||||
|
|
||||||
echo "Starting scripts :"
|
echo "Starting scripts :"
|
||||||
for SCRIPTS in scripts/*; do
|
for SCRIPTS in scripts/*; do
|
||||||
[ -e "$SCRIPTS" ] || continue
|
[ -e "$SCRIPTS" ] || continue
|
||||||
|
|||||||
Reference in New Issue
Block a user