Clean s6 support

This commit is contained in:
Alexandre
2023-02-12 11:43:48 +01:00
parent 16543e0032
commit 548cf0d2dc

View File

@@ -37,9 +37,9 @@ for KEYS in "${arr[@]}"; do
bashio::log.blue "$line"
fi
######################################
######################################
# Export the variable to run scripts #
######################################
######################################
export "${KEYS}='${VALUE//[\"\']/}'"
# For non s6
@@ -47,7 +47,6 @@ for KEYS in "${arr[@]}"; do
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 "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi
if cat /etc/s6-overlay/s6-rc.d/svc-*/*run* &>/dev/null; then sed -i "1a export $line" /etc/s6-overlay/s6-rc.d/svc-*/*run* 2>/dev/null; fi
done