From 7ad003a65e0d30c06374cd7d9f4498a7f9513a81 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 7 Sep 2023 23:11:36 +0200 Subject: [PATCH] Create ha_entrypoint.sh --- postgres/rootfs/ha_entrypoint.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 postgres/rootfs/ha_entrypoint.sh diff --git a/postgres/rootfs/ha_entrypoint.sh b/postgres/rootfs/ha_entrypoint.sh new file mode 100644 index 000000000..5d6e3579e --- /dev/null +++ b/postgres/rootfs/ha_entrypoint.sh @@ -0,0 +1,29 @@ +/command/with-contenv bashio +# shellcheck shell=bash +echo "Starting..." + +#################### +# Starting scripts # +#################### + +for SCRIPTS in /etc/cont-init.d/*; do + [ -e "$SCRIPTS" ] || continue + echo "$SCRIPTS: executing" + chown "$(id -u)":"$(id -g)" "$SCRIPTS" + chmod a+x "$SCRIPTS" + # Change shebang if no s6 supervision + sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" + /usr/bin/env bashio "$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?" + rm "$SCRIPTS" +done + +###################### +# Starting container # +###################### + +echo " " +echo -e "\033[0;32mStarting the upstream container\033[0m" +echo " " + +# Launch lsio mods +if [ -f /docker-mods ]; then exec /docker-mods; fi