This commit is contained in:
Alexandre
2022-01-17 13:18:05 +01:00
parent 0b0b471cbe
commit a22ce94a46
67 changed files with 263 additions and 207 deletions

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
###################################
# Export all addon options as env #
@@ -16,7 +17,7 @@ for KEYS in ${arr[@]}; do
line="${KEYS}=${VALUE//[\"\']/}"
# Use locally
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
# Export the variable to run scripts
# Export the variable to run scripts
line="${KEYS}=${VALUE//[\"\']/} 2>/dev/null || true"
[ -f /etc/services.d/*/*run* ] && sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null
[ -f /etc/cont-init.d/*run* ] && sed -i "1a export $line" /etc/cont-init.d/*run* 2>/dev/null