Allow multiple files

This commit is contained in:
Alexandre
2022-02-04 10:34:01 +01:00
parent a6cfa0b679
commit 8e3bd2b496

View File

@@ -19,8 +19,8 @@ for KEYS in ${arr[@]}; do
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
# Export the variable to run scripts
line="${KEYS}=${VALUE//[\"\']/} 2>/dev/null || true"
if [ -f /etc/services.d/*/*run* ]; then sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null; fi
if [ -f /etc/cont-init.d/*run* ]; then sed -i "1a export $line" /etc/cont-init.d/*run* 2>/dev/null; fi
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
done
################