From d685fa88b2cdbaa8c8eec6ceca1387195a8f3d02 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 10 May 2022 09:04:35 +0200 Subject: [PATCH] Update 00-aaa_dockerfile_backup.sh --- .templates/00-aaa_dockerfile_backup.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.templates/00-aaa_dockerfile_backup.sh b/.templates/00-aaa_dockerfile_backup.sh index 08497f0e2..bb8872f05 100644 --- a/.templates/00-aaa_dockerfile_backup.sh +++ b/.templates/00-aaa_dockerfile_backup.sh @@ -1,5 +1,4 @@ #!/bin/bash -# shellcheck disable=SC2116 # If dockerfile failed install manually @@ -32,3 +31,13 @@ if [ -e "/ENVFILE" ]; then && eval /./automatic_packages.sh "${PACKAGES:-}" \ && rm /automatic_packages.sh fi + +if [ -e "/MODULESFILE" ] && [ ! -f /entrypoint.sh ]; then + for scripts in $MODULES; do + echo "$scripts : executing" + chown "$(id -u)":"$(id -g)" /etc/cont-init.d/"$scripts" + chmod a+x /etc/cont-init.d/"$scripts" + /./etc/cont-init.d/"$scripts" || echo "/etc/cont-init.d/$scripts: exiting $?" + rm /etc/cont-init.d/"$scripts" + done | tac +fi