From 649e71ed4303a974ec38f5bf0863e3ad83cfba7c Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 10 Jan 2024 07:09:32 +0100 Subject: [PATCH] Update ha_entrypoint_modif.sh --- .templates/ha_entrypoint_modif.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.templates/ha_entrypoint_modif.sh b/.templates/ha_entrypoint_modif.sh index a6e68246c..1354f9a9c 100755 --- a/.templates/ha_entrypoint_modif.sh +++ b/.templates/ha_entrypoint_modif.sh @@ -8,15 +8,26 @@ set -e # Corrects permissions for s6 v3 ################################ +PUID="{PUID:-0}" +PGID="{PGID:-0}" + +if [ -f /ha_entrypoint.sh ]; then + chown -R "$PUID:$PGID" /ha_entrypoint.sh + chmod -R 755 /ha_entrypoint.sh +fi + if [ -d /etc/cont-init.d ]; then + chown -R "$PUID:$PGID" /etc/cont-init.d chmod -R 755 /etc/cont-init.d fi if [ -d /etc/services.d ]; then + chown -R "$PUID:$PGID" /etc/services.d chmod -R 755 /etc/services.d fi if [ -d /etc/s6-rc.d ]; then + chown -R "$PUID:$PGID" /etc/s6-rc.d chmod -R 755 /etc/s6-rc.d fi