Update 01-config_yaml.sh

This commit is contained in:
Alexandre
2023-11-23 13:38:04 +01:00
committed by GitHub
parent 9d49649ae3
commit eba65a4640

View File

@@ -167,15 +167,15 @@ while IFS= read -r line; do
python3 /env.py
fi
# set .env
if [ -f /.env ]; then echo "$KEYS=$VALUE" >> /.env; fi
if [ -f /.env ]; then echo "$KEYS='$VALUE'" >> /.env; fi
mkdir -p /etc
echo "$KEYS=$VALUE" >> /etc/environment
echo "$KEYS='$VALUE'" >> /etc/environment
# Export to scripts
if cat /etc/services.d/*/*run* &>/dev/null; then sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null; fi
if cat /etc/cont-init.d/*run* &>/dev/null; then sed -i "1a export $line" /etc/cont-init.d/*run* 2>/dev/null; fi
# For s6
if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi
echo "export ${KEYS}=\"${VALUE}\"" >> ~/.bashrc
echo "export $line" >> ~/.bashrc
# Show in log
if ! bashio::config.false "verbose"; then bashio::log.blue "$KEYS='$VALUE'"; fi
else