Avoid error if cont-env not defined

This commit is contained in:
Alexandre
2023-09-09 20:04:45 +02:00
parent 954460e73a
commit c483228049
82 changed files with 83 additions and 2 deletions

View File

@@ -95,6 +95,7 @@ RUN \
if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \
if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \
#Correct shebang in entrypoint
mkdir -p /run/s6/container_environment && \
for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh
#