From 60fa2363eb1257174765c5f14a3fb05aa7d9ab61 Mon Sep 17 00:00:00 2001 From: "Josh.5" Date: Sat, 9 Sep 2023 20:50:29 +1200 Subject: [PATCH] Create some temp files to indicate that the container has executed the init scripts for the first time This could be useful for the user scripts to read to know if this is the first time they are running on this container or if the container was just restarted --- overlay/entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/overlay/entrypoint.sh b/overlay/entrypoint.sh index f99a637..a2d66b7 100644 --- a/overlay/entrypoint.sh +++ b/overlay/entrypoint.sh @@ -29,6 +29,7 @@ for init_script in /etc/cont-init.d/*.sh ; do sed -i 's/\r$//' "${init_script:?}" source "${init_script:?}" done +touch /tmp/.first-run-init-scripts # Execute any user generated init scripts mkdir -p ${USER_HOME:?}/init.d @@ -54,6 +55,7 @@ for user_init_script in ${USER_HOME:?}/init.d/*.sh ; do fi done +touch /tmp/.first-run-user-init-scripts # Start supervisord echo