From 954460e73a060badd8c0ffb0954a806cb577d611 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sat, 9 Sep 2023 19:49:39 +0200 Subject: [PATCH] test --- test/Dockerfile | 5 +++-- test/config.json | 2 +- test/rootfs/etc/cont-init.d/99-run.sh | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/Dockerfile b/test/Dockerfile index 7118b0fee..eb92b49a4 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -64,12 +64,13 @@ 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 - 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 + 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 && \ + echo "Shebang is $shebang" # Entrypoint logic #WORKDIR / -ENTRYPOINT [ "/usr/bin/env" ] +ENTRYPOINT [ "/ha_entrypoint.sh" ] CMD [ "/ha_entrypoint.sh" ] # Set shell SHELL ["/bin/bash", "-o", "pipefail", "-c"] diff --git a/test/config.json b/test/config.json index a58141314..f33413ab6 100644 --- a/test/config.json +++ b/test/config.json @@ -31,5 +31,5 @@ }, "slug": "test", "url": "https://github.com/alexbelgium/hassio-addons/tree/master/addons_updater", - "version": "test3" + "version": "test4" } \ No newline at end of file diff --git a/test/rootfs/etc/cont-init.d/99-run.sh b/test/rootfs/etc/cont-init.d/99-run.sh index 72f48e977..cf5c16726 100755 --- a/test/rootfs/etc/cont-init.d/99-run.sh +++ b/test/rootfs/etc/cont-init.d/99-run.sh @@ -1,5 +1,6 @@ -#!/usr/bin/env bashio +#!/bin/bash # shellcheck shell=bash +echo "nearly" bashio::log.info "It's working"