mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-30 20:34:04 +02:00
#!/usr/bin/with-contenv bashio
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/with-contenv bashio
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
# Export all addon options as env #
|
# Export all addon options as env #
|
||||||
@@ -16,7 +16,7 @@ for KEYS in "${arr[@]}"; do
|
|||||||
line="${KEYS}=${VALUE//[\"\']/}"
|
line="${KEYS}=${VALUE//[\"\']/}"
|
||||||
# Use locally
|
# Use locally
|
||||||
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
|
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
|
||||||
export line
|
export $line
|
||||||
# Export the variable to run scripts
|
# Export the variable to run scripts
|
||||||
line="${KEYS}=${VALUE//[\"\']/} &>/dev/null"
|
line="${KEYS}=${VALUE//[\"\']/} &>/dev/null"
|
||||||
sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || sed -i "1a export $line" /scripts/*run*
|
sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || sed -i "1a export $line" /scripts/*run*
|
||||||
|
|||||||
Reference in New Issue
Block a user