From bd46b368410986adefb70fab49f39797ea6e4e59 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Sun, 23 Jul 2017 21:50:04 -0700 Subject: [PATCH] Better scripting support --- scripts/entrypoint.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index bbc54a7..aff690a 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -19,9 +19,12 @@ export NGINX_PID=$! # Lastly, run startup scripts for f in /scripts/startup/*.sh; do - echo "Running startup script $f" - $f + if [[ -x "$f" ]]; then + echo "Running startup script $f" + $f + fi done +echo "Done with startup" # Run `cron -f &` so that it's a background job owned by bash and then `wait`. # This allows SIGINT (e.g. CTRL-C) to kill cron gracefully, due to our `trap`.