From 2ac7e2e82ae63bfe9a1f0dca3d92760ff8da74b5 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 19 Jan 2022 22:54:01 +0100 Subject: [PATCH] Update 00-aaa_dockerfile_backup.sh --- .../cont-init.d/00-aaa_dockerfile_backup.sh | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gazpar2mqtt/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/gazpar2mqtt/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh index 3eed43965..52b8f7047 100644 --- a/gazpar2mqtt/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh +++ b/gazpar2mqtt/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -7,11 +7,11 @@ if [ -e "/MODULESFILE" ]; then ############################## # Automatic modules download # ############################## - if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi && - if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi && - mkdir -p /tmpscripts /etc/cont-init.d && - for scripts in $MODULES; do curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /tmpscripts/"$scripts"; done && - if [ -d /etc/cont-init.d ]; then /bin/cp -rf /tmpscripts/* /etc/cont-init.d/ && chmod -R 755 /etc/cont-init.d; fi && + if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi && \ + if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi && \ + mkdir -p /tmpscripts /etc/cont-init.d && \ + for scripts in $MODULES; do curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /tmpscripts/"$scripts"; done && \ + if [ -d /etc/cont-init.d ]; then /bin/cp -rf /tmpscripts/* /etc/cont-init.d/ && chmod -R 755 /etc/cont-init.d; fi && \ rm -rf /tmpscripts || printf '%s\n' "${MODULES:-}" >/MODULESFILE ) >/dev/null @@ -24,10 +24,10 @@ if [ -e "/ENVFILE" ]; then ####################### # Automatic installer # ####################### - if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi && - if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi && - curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh && - chmod 777 /automatic_packages.sh && - eval /./automatic_packages.sh "$PACKAGES" && + if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi && \ + if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi && \ + curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh && \ + chmod 777 /automatic_packages.sh && \ + eval /./automatic_packages.sh "$PACKAGES" && \ rm /automatic_packages.sh fi