Skip to content

Commit

Permalink
skip entrypoints if SKIP_ENTRYPOINT is set
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianKniep committed Apr 6, 2017
1 parent 45bbf0c commit c192d95
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions init-plain/usr/local/bin/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/bin/bash
set -e

for x in $(find /opt/qnib/entry/ -type f -perm /u+x |sort);do
echo "> execute entrypoint '${x}'"
if [[ "$x" == *.env ]];then
source ${x}
else
${x}
fi
done
if [[ -z ${SKIP_ENTRYPOINTS} ]];then
for x in $(find /opt/qnib/entry/ -type f -perm /u+x |sort);do
echo "> execute entrypoint '${x}'"
if [[ "$x" == *.env ]];then
source ${x}
else
${x}
fi
done
fi

if [ "X${ENTRY_USER}" != "X" ];then
echo "> execute CMD as user '${ENTRY_USER}'"
Expand Down

0 comments on commit c192d95

Please sign in to comment.