mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-07 16:15:55 +02:00
Github bot : script beautyshied
This commit is contained in:
@@ -114,9 +114,9 @@ while IFS= read -r line; do
|
|||||||
sed -i "1a export $line" /scripts/*run* 2>/dev/null || true
|
sed -i "1a export $line" /scripts/*run* 2>/dev/null || true
|
||||||
# export on python
|
# export on python
|
||||||
if command -v "python3" &>/dev/null; then
|
if command -v "python3" &>/dev/null; then
|
||||||
[ ! -f /env.py ] && echo "import os" > /env.py
|
[ ! -f /env.py ] && echo "import os" > /env.py
|
||||||
echo "os.environ['${line%%=*}'] = '${line#*=}'" >> /env.py
|
echo "os.environ['${line%%=*}'] = '${line#*=}'" >> /env.py
|
||||||
python3 /env.py
|
python3 /env.py
|
||||||
fi
|
fi
|
||||||
# set .env
|
# set .env
|
||||||
echo "$line" >> /.env || true
|
echo "$line" >> /.env || true
|
||||||
|
|||||||
@@ -62,11 +62,11 @@ esac
|
|||||||
########
|
########
|
||||||
|
|
||||||
if [[ "$(bashio::config "Mode")" == Collector ]]; then
|
if [[ "$(bashio::config "Mode")" == Collector ]]; then
|
||||||
bashio::log.warning "Collector only mode. WebUI and Influxdb will be disabled"
|
bashio::log.warning "Collector only mode. WebUI and Influxdb will be disabled"
|
||||||
rm -r /etc/services.d/influxdb
|
rm -r /etc/services.d/influxdb
|
||||||
rm -r /etc/services.d/scrutiny
|
rm -r /etc/services.d/scrutiny
|
||||||
rm -r /etc/services.d/nginx
|
rm -r /etc/services.d/nginx
|
||||||
sed -i "/wait/d" /etc/services.d/collector-once/run
|
sed -i "/wait/d" /etc/services.d/collector-once/run
|
||||||
sed -i "/scrutiny api not ready/d" /etc/services.d/collector-once/run
|
sed -i "/scrutiny api not ready/d" /etc/services.d/collector-once/run
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -68,11 +68,11 @@ esac
|
|||||||
########
|
########
|
||||||
|
|
||||||
if [[ "$(bashio::config "Mode")" == Collector ]]; then
|
if [[ "$(bashio::config "Mode")" == Collector ]]; then
|
||||||
bashio::log.warning "Collector only mode. WebUI and Influxdb will be disabled"
|
bashio::log.warning "Collector only mode. WebUI and Influxdb will be disabled"
|
||||||
rm -r /etc/services.d/influxdb
|
rm -r /etc/services.d/influxdb
|
||||||
rm -r /etc/services.d/scrutiny
|
rm -r /etc/services.d/scrutiny
|
||||||
rm -r /etc/services.d/nginx
|
rm -r /etc/services.d/nginx
|
||||||
sed -i "/wait/d" /etc/services.d/collector-once/run
|
sed -i "/wait/d" /etc/services.d/collector-once/run
|
||||||
sed -i "/scrutiny api not ready/d" /etc/services.d/collector-once/run
|
sed -i "/scrutiny api not ready/d" /etc/services.d/collector-once/run
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export BASE_URL=$(bashio::config 'BASE_URL'):$(bashio::addon.port 80)
|
|||||||
##############
|
##############
|
||||||
|
|
||||||
if bashio::config.true "base_url_portless"; then
|
if bashio::config.true "base_url_portless"; then
|
||||||
export BASE_URL=$(bashio::config 'BASE_URL')
|
export BASE_URL=$(bashio::config 'BASE_URL')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###################
|
###################
|
||||||
|
|||||||
Reference in New Issue
Block a user