Merge pull request #6919 from nextcloud/enh/6893/delete-caddy-lock

delete caddy locks if existing on startup
This commit is contained in:
Simon L. 2025-10-01 12:33:39 +02:00 committed by GitHub
commit 816675e747
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -66,6 +66,11 @@ caddy fmt --overwrite /tmp/Caddyfile
# Add caddy path # Add caddy path
mkdir -p /mnt/data/caddy/ mkdir -p /mnt/data/caddy/
# Fix caddy startup
if [ -d "/mnt/data/caddy/locks" ]; then
rm -rf /mnt/data/caddy/locks/*
fi
# Fix apache startup # Fix apache startup
rm -f /usr/local/apache2/logs/httpd.pid rm -f /usr/local/apache2/logs/httpd.pid

View file

@ -375,6 +375,11 @@ export TZ=Etc/UTC
# Fix apache startup # Fix apache startup
rm -f /var/run/apache2/httpd.pid rm -f /var/run/apache2/httpd.pid
# Fix caddy startup
if [ -d "/mnt/docker-aio-config/caddy/locks" ]; then
rm -rf /mnt/docker-aio-config/caddy/locks/*
fi
# Fix the Caddyfile format # Fix the Caddyfile format
caddy fmt --overwrite /Caddyfile caddy fmt --overwrite /Caddyfile