From b683871c9db60062a3e606cccb89ee0f37e6858d Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sat, 22 Jan 2022 19:17:28 +0100 Subject: [PATCH] align repo logic --- spotweb/Dockerfile | 8 ++--- spotweb/config.json | 2 +- .../cont-init.d/00-aaa_dockerfile_backup.sh | 33 +++++++++++++++++++ 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 spotweb/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh diff --git a/spotweb/Dockerfile b/spotweb/Dockerfile index c5b492f85..d10d4bce7 100644 --- a/spotweb/Dockerfile +++ b/spotweb/Dockerfile @@ -28,7 +28,7 @@ ENV LANG C.UTF-8 ENV APP_ID="spotweb" ENV APP_NAME="Spotweb" ENV APP_DIR="/app" -ENV SPOTWEB_RELEASE="1.5.1" +ENV BUILD_UPSTREAM="1.5.1" # Set shell SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -132,8 +132,8 @@ LABEL \ org.label-schema.build-date=${BUILD_DATE} \ org.label-schema.name="${APP_NAME}" \ org.label-schema.schema-version="1.0" \ - org.label-schema.url="https://github.com/alexbelgium/hassio-addons/${APP_ID}" \ - org.label-schema.usage="https://github.com/alexbelgium/hassio-addons/tree/master/${APP_ID}/README.md" \ + org.label-schema.url="https://github.com/woutercoppens/hassio-addons/${APP_ID}" \ + org.label-schema.usage="https://github.com/woutercoppens/hassio-addons/tree/master/${APP_ID}/README.md" \ org.label-schema.vcs-ref=${BUILD_REF} \ - org.label-schema.vcs-url="https://github.com/alexbelgium/hassio-addons/${APP_ID}" \ + org.label-schema.vcs-url="https://github.com/woutercoppens/hassio-addons/${APP_ID}" \ org.label-schema.vendor="Wouter's Community Add-ons for Home Assistant" \ No newline at end of file diff --git a/spotweb/config.json b/spotweb/config.json index 8a0cb7749..dea1cf787 100644 --- a/spotweb/config.json +++ b/spotweb/config.json @@ -1,5 +1,5 @@ { - "arch": ["aarch64", "amd64", "armhf", "armv7", "i386"], + "arch": ["aarch64", "amd64", "armv7"], "name": "Spotweb by @woutercoppens", "image": "ghcr.io/alexbelgium/spotweb-{arch}", "version": "dev", diff --git a/spotweb/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/spotweb/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..150053296 --- /dev/null +++ b/spotweb/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# If dockerfile failed install manually + +############################## +# Automatic modules download # +############################## +if [ -e "/MODULESFILE" ]; then + echo "Executing modules script" + MODULES=$(/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 \ + && mkdir -p /etc/cont-init.d \ + && for scripts in $MODULES; do curl -L -f -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" || (echo "script failed to install $scripts" && exit 1); done \ + && chmod -R 755 /etc/cont-init.d +fi + +####################### +# Automatic installer # +####################### +if [ -e "/ENVFILE" ]; then + echo "Executing script" + PACKAGES=$(/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