From 207b4d5f9efe7e9d17c41cf4ff03b0fbeb7c9f57 Mon Sep 17 00:00:00 2001 From: Craig Anderson Date: Thu, 9 Aug 2018 15:21:46 +0100 Subject: [PATCH] Remove apache2.pid which can hang around after dirty exit. --- start-apache.sh | 7 +++++++ 1 file changed, 7 insertions(+) mode change 100644 => 100755 start-apache.sh diff --git a/start-apache.sh b/start-apache.sh old mode 100644 new mode 100755 index a5c5b9b..7e9c11e --- a/start-apache.sh +++ b/start-apache.sh @@ -86,4 +86,11 @@ a2enmod rewrite # Stop apache first if is still running from the last time the container was run service apache2 stop +# apache2.pid can hang around from previous dirty exits +# (https://github.com/kwk/docker-registry-frontend/issues/159) +if [ -f /var/run/apache2/apache2.pid ] +then + rm /var/run/apache2/apache2.pid +fi + /usr/sbin/apache2ctl -D FOREGROUND ${useSsl}