Use template entrypoint

This commit is contained in:
Alexandre
2023-09-05 17:43:56 +02:00
parent 3a001e8bc1
commit 5504a88a11
83 changed files with 309 additions and 147 deletions

View File

@@ -96,16 +96,18 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get
# 4 Entrypoint #
################
# Add entrypoint
ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/entrypoint.sh" "/ha_entrypoint.sh"
# Corrects permissions for s6 v3
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 && \
if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \
if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi
#RUN chmod 777 /entrypoint.sh
#WORKDIR /
#ENTRYPOINT [ "/usr/bin/env" ]
#CMD [ "/entrypoint.sh" ]
#CMD [ "/ha_entrypoint.sh" ]
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
############

View File

@@ -110,6 +110,6 @@
"slug": "webtop-kde",
"tmpfs": true,
"url": "https://github.com/alexbelgium/hassio-addons",
"version": "4.16-r0-ls89-xfce6",
"version": "4.16-r0-ls89-xfce7",
"video": true
}

View File

@@ -1,25 +0,0 @@
#!/bin/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"
/."$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 ""