diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index ad6cdc21..5648243a 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -6,4 +6,10 @@ if [ -n "$DATABASE" ]; then echo -e '\ndatabase: "'$DATABASE'"' >> /etc/kong/kong.yml fi -exec "$@" \ No newline at end of file +# Make sure kong processes won't be considered as running because of pid file +if [ $( ls -1 /usr/local/kong/*pid | wc -l ) -gt 0 ] +then + rm /usr/local/kong/*pid +fi + +exec "$@"