From 4429a3aef03e5a0a5c0bf835bc56fa822bb28c1d Mon Sep 17 00:00:00 2001 From: Nicolas Vanheuverzwijn Date: Mon, 8 Oct 2018 14:57:31 -0400 Subject: [PATCH] fix: no longer crash if start and stop script path does not exists. --- entrypoint.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 385ff2d..948de3a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,10 +3,15 @@ process_scripts() { local path=$1 - for script in $(ls $path | sort -n); do - echo "> Sourcing '${path}/${script}'.." - source "${path}/${script}" - done + if [[ ! -d $path ]]; then + echo "> Entrypoint point path script '${path}' does not exist." + echo "> Skipping.." + else + for script in $(ls $path | sort -n); do + echo "> Sourcing '${path}/${script}'.." + source "${path}/${script}" + done + fi } kill_remaining_process() {