mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-19 05:49:12 +02:00
Change bashio commands
This commit is contained in:
@@ -13,7 +13,11 @@ if ! bashio::supervisor.ping 2>/dev/null; then
|
|||||||
bashio::log.blue "Please use Docker Compose for env variables"
|
bashio::log.blue "Please use Docker Compose for env variables"
|
||||||
bashio::log.blue \
|
bashio::log.blue \
|
||||||
'-----------------------------------------------------------'
|
'-----------------------------------------------------------'
|
||||||
|
# Use environment variables instead of addon options
|
||||||
|
echo "... convert scripts to use environment variables instead of addon options"
|
||||||
|
sed -i -e 's/bashio::config.has_value[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"']/[ ! -z \${\1+x} ]/g' -e 's/bashio::config[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"']/\${\1}/g' /etc/cont-init.d/*
|
||||||
# Fake options.json
|
# Fake options.json
|
||||||
|
echo "... create empty /data/options.json for bashio compatibility"
|
||||||
mkdir -p /data
|
mkdir -p /data
|
||||||
touch /data/option.json
|
touch /data/option.json
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user