[24378] Clear apache PID file

It may be dangling after stopping/restarting a container

https://community.openproject.com/wp/24378
pull/7254/head
Oliver Günther 6 years ago
parent 6cf53199d1
commit 433375cc30
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 7
      docker/entrypoint.sh

@ -3,6 +3,8 @@
set -e
set -o pipefail
APACHE_PIDFILE=/run/apache2/apache2.pid
# handle legacy configs
if [ -d "$PGDATA_LEGACY" ]; then
echo "WARN: You are using a legacy volume path for your postgres data. You should mount your postgres volumes at $PGDATA instead of $PGDATA_LEGACY."
@ -35,6 +37,11 @@ if [ "$(id -u)" = '0' ]; then
mkdir -p $APP_DATA_PATH/{files,git,svn}
chown -R $APP_USER:$APP_USER $APP_DATA_PATH
# Clean up a dangling PID file of apache
if [ -e "$APACHE_PIDFILE" ]; then
rm -f $APACHE_PIDFILE || true
fi
if [ ! -z "$ATTACHMENTS_STORAGE_PATH" ]; then
mkdir -p "$ATTACHMENTS_STORAGE_PATH"
chown -R "$APP_USER:$APP_USER" "$ATTACHMENTS_STORAGE_PATH"

Loading…
Cancel
Save