Skip to content

Commit

Permalink
fix: no longer crash if start and stop script path does not exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
nvanheuverzwijn committed Oct 8, 2018
1 parent 05e1538 commit 4429a3a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 4429a3a

Please sign in to comment.