From c79fc22b3344202f48d533c70f3137f11a60fceb Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 10 Dec 2021 07:27:25 +0100 Subject: [PATCH] Update 00-aaa_dockerfile_backup.sh --- .../etc/cont-init.d/00-aaa_dockerfile_backup.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/emby/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/emby/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh index dde571ac8..e33f7f063 100644 --- a/emby/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh +++ b/emby/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -1,15 +1,17 @@ #!/bin/bash # If dockerfile failed install manually -if [ ! -f "/usr/bin/bashio" ]; then +if [ -e "/ENVFILE" ]; then echo "Executing script" + PACKAGES=$(< /ENVFILE) ( ####################### # Automatic installer # ####################### - $(curl --help &>/dev/null) && (apt-get install -y --no-install-recommends curl || apk add --no-cache curl) - curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh - chmod 777 /automatic_packages.sh - eval /./automatic_packages.sh + $(ls /bin/bash &>/dev/null) || (apt-get install -y --no-install-recommends bash || apk add --no-cache bash) && \ + $(curl --help &>/dev/null) || (apt-get install -y --no-install-recommends curl &>/dev/null || apk add --no-cache curl) && \ + curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh && \ + chmod 777 /automatic_packages.sh && \ + eval /./automatic_packages.sh "$PACKAGES" && \ rm /automatic_packages.sh ) >/dev/null